From 3d730c06a144851499676509ab61c2fb24c546ed Mon Sep 17 00:00:00 2001 From: Satyam Singh Date: Fri, 15 Dec 2023 21:19:00 +0530 Subject: [PATCH] Move testcase (#49) --- quest_test.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/quest_test.go b/quest_test.go index 4391e06..4270605 100644 --- a/quest_test.go +++ b/quest_test.go @@ -62,22 +62,6 @@ func TestSmokeIngestEventsToStream(t *testing.T) { DeleteStream(t, NewGlob.Client, NewGlob.Stream) } -func TestSmokeLoadWithK6Stream(t *testing.T) { - CreateStream(t, NewGlob.Client, NewGlob.Stream) - cmd := exec.Command("k6", - "run", - "-e", fmt.Sprintf("P_URL=%s", NewGlob.Url.String()), - "-e", fmt.Sprintf("P_USERNAME=%s", NewGlob.Username), - "-e", fmt.Sprintf("P_PASSWORD=%s", NewGlob.Password), - "-e", fmt.Sprintf("P_STREAM=%s", NewGlob.Stream), - "./scripts/smoke.js") - - cmd.Run() - cmd.Output() - QueryLogStreamCount(t, NewGlob.Client, NewGlob.Stream, 60000) - AssertStreamSchema(t, NewGlob.Client, NewGlob.Stream, SchemaBody) -} - func TestSmokeQueryTwoStreams(t *testing.T) { stream1 := NewGlob.Stream + "1" stream2 := NewGlob.Stream + "2" @@ -108,6 +92,22 @@ func TestSmokeRunQueries(t *testing.T) { DeleteStream(t, NewGlob.Client, NewGlob.Stream) } +func TestSmokeLoadWithK6Stream(t *testing.T) { + CreateStream(t, NewGlob.Client, NewGlob.Stream) + cmd := exec.Command("k6", + "run", + "-e", fmt.Sprintf("P_URL=%s", NewGlob.Url.String()), + "-e", fmt.Sprintf("P_USERNAME=%s", NewGlob.Username), + "-e", fmt.Sprintf("P_PASSWORD=%s", NewGlob.Password), + "-e", fmt.Sprintf("P_STREAM=%s", NewGlob.Stream), + "./scripts/smoke.js") + + cmd.Run() + cmd.Output() + QueryLogStreamCount(t, NewGlob.Client, NewGlob.Stream, 60000) + AssertStreamSchema(t, NewGlob.Client, NewGlob.Stream, SchemaBody) +} + func TestSmokeSetAlert(t *testing.T) { req, _ := NewGlob.Client.NewRequest("PUT", "logstream/"+NewGlob.Stream+"/alert", strings.NewReader(AlertBody)) response, err := NewGlob.Client.Do(req)