Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
make tests for OrgIdPublic work
Browse files Browse the repository at this point in the history
  • Loading branch information
Dieterbe committed Apr 10, 2018
1 parent b25d02c commit e72b7e4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions idx/cassandra/cassandra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ func getMetricData(orgId, depth, count, interval int, prefix string) []*schema.M
}

func TestGetAddKey(t *testing.T) {
idx.OrgIdPublic = 100
defer func() { idx.OrgIdPublic = 0 }()

ix := New()
initForTests(ix)

Expand Down Expand Up @@ -256,6 +259,8 @@ func TestAddToWriteQueue(t *testing.T) {
}

func TestFind(t *testing.T) {
idx.OrgIdPublic = 100
defer func() { idx.OrgIdPublic = 0 }()
ix := New()
initForTests(ix)
for _, s := range getMetricData(idx.OrgIdPublic, 2, 5, 10, "metric.demo") {
Expand Down
12 changes: 12 additions & 0 deletions idx/memory/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func TestGetAddKey(t *testing.T) {
}

func testGetAddKey(t *testing.T) {
idx.OrgIdPublic = 100
defer func() { idx.OrgIdPublic = 0 }()

ix := New()
ix.Init()

Expand Down Expand Up @@ -126,6 +129,9 @@ func TestFind(t *testing.T) {
}

func testFind(t *testing.T) {
idx.OrgIdPublic = 100
defer func() { idx.OrgIdPublic = 0 }()

ix := New()
ix.Init()
for _, s := range getMetricData(idx.OrgIdPublic, 2, 5, 10, "metric.demo", false) {
Expand Down Expand Up @@ -253,6 +259,9 @@ func TestDelete(t *testing.T) {
}

func testDelete(t *testing.T) {
idx.OrgIdPublic = 100
defer func() { idx.OrgIdPublic = 0 }()

ix := New()
ix.Init()

Expand All @@ -268,6 +277,9 @@ func testDelete(t *testing.T) {
}

func TestDeleteTagged(t *testing.T) {
idx.OrgIdPublic = 100
defer func() { idx.OrgIdPublic = 0 }()

ix := New()
ix.Init()

Expand Down

0 comments on commit e72b7e4

Please sign in to comment.