From 0fed52cb151b789e6e370ea79ec1aa1277456d58 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Thu, 24 Mar 2016 19:31:24 -0700 Subject: [PATCH] Removing non relevant tests --- client/consul/checks_test.go | 37 ------------------------------------ 1 file changed, 37 deletions(-) delete mode 100644 client/consul/checks_test.go diff --git a/client/consul/checks_test.go b/client/consul/checks_test.go deleted file mode 100644 index 6354084f9..000000000 --- a/client/consul/checks_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package consul - -import ( - "reflect" - "testing" - "time" -) - -func TestCheckHeapOrder(t *testing.T) { - h := NewConsulChecksHeap() - - c1 := ExecScriptCheck{id: "a"} - c2 := ExecScriptCheck{id: "b"} - c3 := ExecScriptCheck{id: "c"} - - lookup := map[Check]string{ - &c1: "c1", - &c2: "c2", - &c3: "c3", - } - - h.Push(&c1, time.Time{}) - h.Push(&c2, time.Unix(10, 0)) - h.Push(&c3, time.Unix(11, 0)) - - expected := []string{"c2", "c3", "c1"} - var actual []string - for i := 0; i < 3; i++ { - cCheck := h.Pop() - - actual = append(actual, lookup[cCheck.check]) - } - - if !reflect.DeepEqual(actual, expected) { - t.Fatalf("Wrong ordering; got %v; want %v", actual, expected) - } -}