Skip to content

Commit

Permalink
fix LabelStore test
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Apr 11, 2020
1 parent eaf2962 commit c70a652
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/middlewares/canary/label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestLabelStore(t *testing.T) {
t.Run("mustLoadEntry should work", func(t *testing.T) {
a := assert.New(t)

cfg := dynamic.Canary{MaxCacheSize: 3, Server: "localhost", Product: "T"}
cfg := dynamic.Canary{MaxCacheSize: 3, Server: "localhost1", Product: "T"}
ls := NewLabelStore(logrus.StandardLogger(), cfg, time.Second, time.Second*2)
ls.mustFetchLabels = func(ctx context.Context, uid, requestID string) ([]Label, int64) {
return []Label{{Label: requestID}}, time.Now().Unix()
Expand Down Expand Up @@ -83,7 +83,7 @@ func TestLabelStore(t *testing.T) {
t.Run("MustLoadLabels should work", func(t *testing.T) {
a := assert.New(t)

cfg := dynamic.Canary{MaxCacheSize: 3, Server: "localhost", Product: "T"}
cfg := dynamic.Canary{MaxCacheSize: 3, Server: "localhost2", Product: "T"}
ls := NewLabelStore(logrus.StandardLogger(), cfg, time.Second, time.Second*2)
ls.mustFetchLabels = func(ctx context.Context, uid, requestID string) ([]Label, int64) {
return []Label{{Label: requestID}}, time.Now().Unix()
Expand Down

0 comments on commit c70a652

Please sign in to comment.