Skip to content

Made an integration test more reliable #2125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions internal/integrationtest/core/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ func TestCoreSearchNoArgs(t *testing.T) {
for _, v := range strings.Split(strings.TrimSpace(string(stdout)), "\n") {
lines = append(lines, strings.Fields(strings.TrimSpace(v)))
}
// The header is printed on the first lines
require.Equal(t, []string{"test:x86", "2.0.0", "test_core"}, lines[21])
// Check the presence of test:[email protected]
require.Contains(t, lines, []string{"test:x86", "2.0.0", "test_core"})
numPlatforms := len(lines) - 1

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

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