Skip to content
Snippets Groups Projects
Commit fd791f9d authored by Oliver's avatar Oliver
Browse files

test - were these ever working?

parent 7c1e78bb
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -34,6 +34,7 @@ steps:
- name: tests
image: "golang:1.12"
environment:
LOG_LEVEL: "debug"
TEST_TILE38_URI: "tile38:9851"
TEST_SECOND_REDIS_URI: "redis://moar-redis:6380"
TEST_REDIS_CLUSTER_MASTER_URI: "redis-cluster:7000"
Loading
Loading
@@ -45,7 +46,7 @@ steps:
- 'echo " ! gofmt -d exporter/*.go 2>&1 | read " | bash'
- 'go vet ./exporter/...'
- 'go build'
- "sleep 10"
- "sleep 2"
- 'go test -v -covermode=atomic -cover -race -coverprofile=coverage.txt ./exporter/... --redis.addr=redis'
- 'go get github.com/mattn/goveralls'
- '/go/bin/goveralls -coverprofile=coverage.txt -service=drone.io'
Loading
Loading
Loading
Loading
@@ -1249,8 +1249,8 @@ func TestClusterMaster(t *testing.T) {
log.Printf("master - using host cfg: %#v", host)
e, _ := NewRedisExporter(host, "test", "", "")
 
setupDBKeys(t, defaultRedisHost.Addrs[0])
defer deleteKeysFromDB(t, defaultRedisHost.Addrs[0])
setupDBKeys(t, addr)
defer deleteKeysFromDB(t, addr)
prometheus.Register(e)
 
chM := make(chan prometheus.Metric, 10000)
Loading
Loading
@@ -1260,7 +1260,7 @@ func TestClusterMaster(t *testing.T) {
}()
 
body := downloadUrl(t, ts.URL+"/metrics")
log.Printf("slave - body: %s", body)
log.Printf("master - body: %s", body)
for _, want := range []string{"test_instance_info", "test_master_repl_offset"} {
if !strings.Contains(body, want) {
t.Errorf("Did not find key [%s] \nbody: %s", want, body)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment