Skip to content

Commit

Permalink
Move testcase (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
trueleo authored Dec 15, 2023
1 parent 21e02f5 commit 3d730c0
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions quest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3d730c0

Please sign in to comment.