Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Rabenhorst <sebastian.rabenhorst@shopify.com>
  • Loading branch information
rabenhorst committed Dec 20, 2023
1 parent 6d0acc2 commit c553519
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/e2e/native_histograms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func TestRuleNativeHistograms(t *testing.T) {
testutil.Ok(t, r.WaitSumMetricsWithOptions(e2emon.GreaterOrEqual(1), []string{"prometheus_remote_storage_histograms_total"}, e2emon.WaitMissingMetrics()))

expectedRecordedName := testHistogramMetricName + ":sum"
expectedRecordedHistogram := histograms[len(histograms)-1].ToFloat().Mul(2)
expectedRecordedHistogram := histograms[len(histograms)-1].ToFloat(nil).Mul(2)
queryAndAssert(t, ctx, q.Endpoint("http"), func() string { return expectedRecordedName }, time.Now, promclient.QueryOptions{Deduplicate: true}, expectedHistogramModelVector(expectedRecordedName, nil, expectedRecordedHistogram, map[string]string{"tenant_id": "default-tenant"}))
}

Expand Down
20 changes: 11 additions & 9 deletions test/e2e/rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,18 +558,20 @@ func TestRule_KeepFiringFor(t *testing.T) {
testutil.Ok(t, os.MkdirAll(rulesPath, os.ModePerm))
createRuleFile(t, filepath.Join(rulesPath, "alert_keep_firing_for.yaml"), testAlertRuleKeepFiringFor)

r := rFuture.InitTSDB(filepath.Join(rFuture.InternalDir(), rulesSubDir), []httpconfig.Config{
r := rFuture.InitTSDB(filepath.Join(rFuture.InternalDir(), rulesSubDir), []clientconfig.Config{
{
EndpointsConfig: httpconfig.EndpointsConfig{
// We test Statically Addressed queries in other tests. Focus on FileSD here.
FileSDConfigs: []httpconfig.FileSDConfig{
{
// FileSD which will be used to register discover dynamically q.
Files: []string{filepath.Join(rFuture.InternalDir(), queryTargetsSubDir, "*.yaml")},
RefreshInterval: model.Duration(time.Second),
HTTPConfig: clientconfig.HTTPConfig{
EndpointsConfig: clientconfig.HTTPEndpointsConfig{
// We test Statically Addressed queries in other tests. Focus on FileSD here.
FileSDConfigs: []clientconfig.HTTPFileSDConfig{
{
// FileSD which will be used to register discover dynamically q.
Files: []string{filepath.Join(rFuture.InternalDir(), queryTargetsSubDir, "*.yaml")},
RefreshInterval: model.Duration(time.Second),
},
},
Scheme: "http",
},
Scheme: "http",
},
},
})
Expand Down

0 comments on commit c553519

Please sign in to comment.