Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit cb3e200

Browse files
committed
Fix tests for new note
1 parent b94f601 commit cb3e200

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

e2e/version_test.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"fmt"
2121
"os"
2222
"runtime"
23+
"strings"
2324
"testing"
2425

2526
"github.com/docker/scan-cli-plugin/internal/provider"
@@ -50,7 +51,9 @@ Git commit: %s
5051
Provider: %s
5152
`, internal.Version, internal.GitCommit, getProviderVersion("SNYK_USER_VERSION"))
5253

53-
assert.Equal(t, output, expected)
54+
if !strings.HasPrefix(output, expected) {
55+
t.Fatalf("expected output to start with %q, got %q", expected, output)
56+
}
5457
}
5558

5659
func TestVersionSnykOldBinary(t *testing.T) {
@@ -76,7 +79,9 @@ Provider: %s
7679
`, os.Getenv("SNYK_OLD_VERSION"), provider.SnykDesktopVersion,
7780
internal.Version, internal.GitCommit, getProviderVersion("SNYK_DESKTOP_VERSION"))
7881

79-
assert.Equal(t, output, expected)
82+
if !strings.HasPrefix(output, expected) {
83+
t.Fatalf("expected output to start with %q, got %q", expected, output)
84+
}
8085
}
8186

8287
func TestVersionSnykDesktopBinary(t *testing.T) {
@@ -94,7 +99,9 @@ Git commit: %s
9499
Provider: %s
95100
`, internal.Version, internal.GitCommit, getProviderVersion("SNYK_DESKTOP_VERSION"))
96101

97-
assert.Equal(t, output, expected)
102+
if !strings.HasPrefix(output, expected) {
103+
t.Fatalf("expected output to start with %q, got %q", expected, output)
104+
}
98105
}
99106

100107
func TestVersionWithoutSnykOrConfig(t *testing.T) {

internal/deprecation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
)
2727

2828
const (
29-
message = "> The `docker scan` **command is deprecated** and will no longer be supported after April 13, 2023. \n" +
29+
message = "> The `docker scan` **command is deprecated** and will no longer be supported after April 13th, 2023. \n" +
3030
"> Run the `docker scout cves` command to continue to get vulnerabilities on your images or install the Snyk CLI. \n" +
3131
"> See https://www.docker.com/products/docker-scout for more details."
3232
)

0 commit comments

Comments
 (0)