diff --git a/output/cloud/expv2/integration/integration_test.go b/output/cloud/expv2/integration/integration_test.go index 15adfd66dbc..2d38810f3b1 100644 --- a/output/cloud/expv2/integration/integration_test.go +++ b/output/cloud/expv2/integration/integration_test.go @@ -54,7 +54,7 @@ func TestOutputFlush(t *testing.T) { // init and start the output o, err := expv2.New(logger, conf, cc) require.NoError(t, err) - o.SetTestRunID("my-test-run-id-123") + o.SetTestRunID("123") require.NoError(t, o.Start()) // collect and flush samples diff --git a/output/cloud/expv2/integration/testdata/metricset.json b/output/cloud/expv2/integration/testdata/metricset.json index eb283095caa..9274bf830f9 100644 --- a/output/cloud/expv2/integration/testdata/metricset.json +++ b/output/cloud/expv2/integration/testdata/metricset.json @@ -1,5 +1,5 @@ { - "testRunId": "my-test-run-id-123", + "testRunId": "123", "aggregationPeriod": 3, "metrics": [ { diff --git a/output/cloud/expv2/output_test.go b/output/cloud/expv2/output_test.go index ec6441bf3cb..30c4e933faa 100644 --- a/output/cloud/expv2/output_test.go +++ b/output/cloud/expv2/output_test.go @@ -300,7 +300,7 @@ func TestOutputStopWithTestError(t *testing.T) { o, err := New(logger, config, cc) require.NoError(t, err) - o.SetTestRunID("ref-id-123") + o.SetTestRunID("1234") require.NoError(t, o.Start()) require.NoError(t, o.StopWithTestError(errors.New("an error"))) } diff --git a/output/cloud/insights/enable.go b/output/cloud/insights/enable.go index bab28b6c7b5..3190efa3f36 100644 --- a/output/cloud/insights/enable.go +++ b/output/cloud/insights/enable.go @@ -14,5 +14,5 @@ func Enabled(config cloudapi.Config) bool { // // We currently don't have a backend API to check this // information. - return config.TracesEnabled.ValueOrZero() + return config.TracesEnabled.Bool } diff --git a/output/cloud/output_test.go b/output/cloud/output_test.go index 0260ad30e86..cf68bf0c0e4 100644 --- a/output/cloud/output_test.go +++ b/output/cloud/output_test.go @@ -96,13 +96,13 @@ func TestOutputCreateTestWithConfigOverwrite(t *testing.T) { switch r.URL.Path { case "/v1/tests": fmt.Fprintf(w, `{ -"reference_id": "cloud-create-test", +"reference_id": "12345", "config": { "metricPushInterval": "10ms", "aggregationPeriod": "1s" } }`) - case "/v1/tests/cloud-create-test": + case "/v1/tests/12345": w.WriteHeader(http.StatusOK) default: http.Error(w, "not expected path", http.StatusInternalServerError) @@ -216,7 +216,7 @@ func TestOutputStartWithTestRunID(t *testing.T) { Logger: testutils.NewLogger(t), Environment: map[string]string{ "K6_CLOUD_HOST": ts.URL, - "K6_CLOUD_PUSH_REF_ID": "my-passed-id", + "K6_CLOUD_PUSH_REF_ID": "12345", }, ScriptOptions: lib.Options{ SystemTags: &metrics.DefaultSystemTagSet, @@ -252,7 +252,7 @@ func TestOutputStopWithTestError(t *testing.T) { handler := func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { - case "/v1/tests/test-ref-id-1234": + case "/v1/tests/1234": b, err := io.ReadAll(r.Body) require.NoError(t, err) @@ -282,7 +282,7 @@ func TestOutputStopWithTestError(t *testing.T) { require.NoError(t, err) calledStopFn := false - out.testRunID = "test-ref-id-1234" + out.testRunID = "1234" out.versionedOutput = versionedOutputMock{ callback: func(fn string) { if fn == "StopWithTestError" {