Skip to content

Commit

Permalink
fix local/short testing
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Sep 24, 2024
1 parent c5937aa commit 4573bd2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 14 deletions.
3 changes: 1 addition & 2 deletions test/edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ func (r *Runner) testEdgeCases(t *testing.T) {
custom: r.testEmptyStreamBin,
},
} {
r.run(t, test, test.custom)
if r.Short {
if !r.run(t, test, test.custom) {
return
}
}
Expand Down
3 changes: 1 addition & 2 deletions test/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ func (r *Runner) testFile(t *testing.T) {
// filename: "t_{track_type}_{time}.webm",
// },
} {
r.run(t, test, r.runFileTest)
if r.Short {
if !r.run(t, test, r.runFileTest) {
return
}
}
Expand Down
3 changes: 1 addition & 2 deletions test/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ func (r *Runner) testImages(t *testing.T) {
},
},
} {
r.run(t, test, r.runImagesTest)
if r.Short {
if !r.run(t, test, r.runImagesTest) {
return
}
}
Expand Down
6 changes: 4 additions & 2 deletions test/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ func (r *Runner) RunTests(t *testing.T) {

var testNumber int

func (r *Runner) run(t *testing.T, test *testCase, f func(*testing.T, *testCase)) {
func (r *Runner) run(t *testing.T, test *testCase, f func(*testing.T, *testCase)) bool {
if !r.should(runRequestType[test.requestType]) {
return
return true
}

switch test.requestType {
Expand Down Expand Up @@ -76,6 +76,8 @@ func (r *Runner) run(t *testing.T, test *testCase, f func(*testing.T, *testCase)

f(t, test)
})

return !r.Short
}

func (r *Runner) awaitIdle(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions test/multi.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ func (r *Runner) testMulti(t *testing.T) {
multi: true,
},
} {
r.run(t, test, r.runMultiTest)
if r.Short {
if !r.run(t, test, r.runMultiTest) {
return
}
}
Expand Down
3 changes: 1 addition & 2 deletions test/segments.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ func (r *Runner) testSegments(t *testing.T) {
},
},
} {
r.run(t, test, r.runSegmentsTest)
if r.Short {
if !r.run(t, test, r.runSegmentsTest) {
return
}
}
Expand Down
3 changes: 1 addition & 2 deletions test/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ func (r *Runner) testStream(t *testing.T) {
},
},
} {
r.run(t, test, r.runStreamTest)
if r.Short {
if !r.run(t, test, r.runStreamTest) {
return
}
}
Expand Down

0 comments on commit 4573bd2

Please sign in to comment.