Skip to content

Commit

Permalink
Use NewQueryEngineFactory in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rabenhorst committed May 3, 2023
1 parent 1931844 commit 1a58b18
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions pkg/api/query/v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,12 @@ func TestQueryEndpoints(t *testing.T) {

now := time.Now()
timeout := 100 * time.Second
ef := &QueryEngineFactory{
engineOpts: promql.EngineOpts{
Logger: nil,
Reg: nil,
MaxSamples: 10000,
Timeout: timeout,
},
}
ef := NewQueryEngineFactory(promql.EngineOpts{
Logger: nil,
Reg: nil,
MaxSamples: 10000,
Timeout: timeout,
}, nil)
api := &QueryAPI{
baseAPI: &baseAPI.BaseAPI{
Now: func() time.Time { return now },
Expand Down Expand Up @@ -727,14 +725,12 @@ func TestMetadataEndpoints(t *testing.T) {

now := time.Now()
timeout := 100 * time.Second
ef := &QueryEngineFactory{
engineOpts: promql.EngineOpts{
Logger: nil,
Reg: nil,
MaxSamples: 10000,
Timeout: timeout,
},
}
ef := NewQueryEngineFactory(promql.EngineOpts{
Logger: nil,
Reg: nil,
MaxSamples: 10000,
Timeout: timeout,
}, nil)
api := &QueryAPI{
baseAPI: &baseAPI.BaseAPI{
Now: func() time.Time { return now },
Expand Down

0 comments on commit 1a58b18

Please sign in to comment.