aboutsummaryrefslogtreecommitdiffstats
path: root/modules/test
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-04-22 23:56:27 +0200
committerGitHub <noreply@github.com>2023-04-22 17:56:27 -0400
commitf1173d6879cb26af21483037fae72542f3088408 (patch)
treea1ed73fb2a42c351005974698076f5ee82489d5d /modules/test
parentac384c4e1d207a989d0f646ebc14fd0c26427d4c (diff)
downloadgitea-f1173d6879cb26af21483037fae72542f3088408.tar.gz
gitea-f1173d6879cb26af21483037fae72542f3088408.zip
Use more specific test methods (#24265)
Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'modules/test')
-rw-r--r--modules/test/logchecker_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/test/logchecker_test.go b/modules/test/logchecker_test.go
index 1ed7f427f4..4dfea8c3e3 100644
--- a/modules/test/logchecker_test.go
+++ b/modules/test/logchecker_test.go
@@ -22,26 +22,26 @@ func TestLogChecker(t *testing.T) {
log.Info("test")
filtered, stopped := lc.Check(100 * time.Millisecond)
- assert.EqualValues(t, []bool{false, false}, filtered)
- assert.EqualValues(t, false, stopped)
+ assert.ElementsMatch(t, []bool{false, false}, filtered)
+ assert.False(t, stopped)
log.Info("First")
filtered, stopped = lc.Check(100 * time.Millisecond)
- assert.EqualValues(t, []bool{true, false}, filtered)
- assert.EqualValues(t, false, stopped)
+ assert.ElementsMatch(t, []bool{true, false}, filtered)
+ assert.False(t, stopped)
log.Info("Second")
filtered, stopped = lc.Check(100 * time.Millisecond)
- assert.EqualValues(t, []bool{true, false}, filtered)
- assert.EqualValues(t, false, stopped)
+ assert.ElementsMatch(t, []bool{true, false}, filtered)
+ assert.False(t, stopped)
log.Info("Third")
filtered, stopped = lc.Check(100 * time.Millisecond)
- assert.EqualValues(t, []bool{true, true}, filtered)
- assert.EqualValues(t, false, stopped)
+ assert.ElementsMatch(t, []bool{true, true}, filtered)
+ assert.False(t, stopped)
log.Info("End")
filtered, stopped = lc.Check(100 * time.Millisecond)
- assert.EqualValues(t, []bool{true, true}, filtered)
- assert.EqualValues(t, true, stopped)
+ assert.ElementsMatch(t, []bool{true, true}, filtered)
+ assert.True(t, stopped)
}