Skip to content

Commit f3715e4

Browse files
authored
[skip-changelog] Made an integration test more reliable (#2125)
1 parent 7201154 commit f3715e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: internal/integrationtest/core/core_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ func TestCoreSearchNoArgs(t *testing.T) {
160160
for _, v := range strings.Split(strings.TrimSpace(string(stdout)), "\n") {
161161
lines = append(lines, strings.Fields(strings.TrimSpace(v)))
162162
}
163-
// The header is printed on the first lines
164-
require.Equal(t, []string{"test:x86", "2.0.0", "test_core"}, lines[21])
163+
// Check the presence of test:[email protected]
164+
require.Contains(t, lines, []string{"test:x86", "2.0.0", "test_core"})
165165
numPlatforms := len(lines) - 1
166166

167167
// same thing in JSON format, also check the number of platforms found is the same
@@ -177,8 +177,8 @@ func TestCoreSearchNoArgs(t *testing.T) {
177177
for _, v := range strings.Split(strings.TrimSpace(string(stdout)), "\n") {
178178
lines = append(lines, strings.Fields(strings.TrimSpace(v)))
179179
}
180-
// The header is printed on the first lines
181-
require.Equal(t, []string{"test:x86", "3.0.0", "test_core"}, lines[22])
180+
// Check the presence of test:[email protected]
181+
require.Contains(t, lines, []string{"test:x86", "3.0.0", "test_core"})
182182
numPlatforms = len(lines) - 1
183183

184184
// same thing in JSON format, also check the number of platforms found is the same

0 commit comments

Comments
 (0)