Skip to content

Instantly share code, notes, and snippets.

View charithe's full-sized avatar

Charith Ellawala charithe

View GitHub Profile

Keybase proof

I hereby claim:

  • I am charithe on github.
  • I am charithe (https://keybase.io/charithe) on keybase.
  • I have a public key ASCum6rRJhYWxdWnYYXRfmrfD6a7-q3wBP80FSKiO5NaPgo

To claim this, I am signing this object:

@charithe
charithe / redis_test.go
Created October 27, 2018 11:21
Using Dockertest to launch Redis
import (
"net"
"testing"
"github.com/go-redis/redis"
"github.com/ory/dockertest"
)
func TestRedisStore(t *testing.T) {
addr, destroyFunc := startRedis(t)
@charithe
charithe / grpc_test.go
Created October 27, 2018 11:49
Using Toxiproxy for resilliency tests
import (
"net"
"strconv"
"testing"
"time"
"github.com/Shopify/toxiproxy"
toxiclient "github.com/Shopify/toxiproxy/client"
)
package mapbench
import (
"sync"
log "github.com/sirupsen/logrus"
)
type MapBench struct {
objects sync.Map
@charithe
charithe / x_test.go
Created June 22, 2023 09:33
Viewing Cerbos test server logs
package x_test
import (
"context"
"testing"
"go.uber.org/zap"
"go.uber.org/zap/zaptest"
"github.com/cerbos/cerbos/client"