Skip to content

Commit 59207e2

Browse files
committed
Remove --server-id=default from binary scan tests
Binary scan tests don't create JFrog Home config like Docker tests do. Docker tests call InitTestWithMockCommandOrParams which creates the config via CreateJfrogHomeConfig, but binary scan tests only call InitScanTest which doesn't. The scan command with --server-id=default tries to load config from file via CreateServerDetailsWithConfigOffer, but that file doesn't exist in binary test environment, causing 'Using <> server-id configuration' (empty) and 'JFrog Xray URL must be provided' errors. Solution: Remove --server-id=default so binary scan tests use credentials passed directly by PlatformCli (--url, --access-token flags) instead of trying to load from non-existent config file. Changes: - Removed --server-id=default from runXrayBinaryScan (line 95) - Removed --server-id=default from TestXrayBinaryScanWithBypassArchiveLimits (line 228) - Kept --bypass-archive-limits flag for handling large archives This makes binary scan tests consistent with how PlatformCli passes credentials (via flags, not config file).
1 parent 827b41c commit 59207e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scans_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func testXrayBinaryScan(t *testing.T, params binaryScanParams, errorExpected boo
9292
}
9393

9494
func runXrayBinaryScan(t *testing.T, params binaryScanParams) (string, error) {
95-
return securityTests.PlatformCli.RunCliCmdWithOutputs(t, append([]string{"scan", "--server-id=default"}, getBinaryScanCmdArgs(params)...)...)
95+
return securityTests.PlatformCli.RunCliCmdWithOutputs(t, append([]string{"scan"}, getBinaryScanCmdArgs(params)...)...)
9696
}
9797

9898
// Binary scan tests

0 commit comments

Comments
 (0)