-
Notifications
You must be signed in to change notification settings - Fork 21
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
Validate xray url #160
base: dev
Are you sure you want to change the base?
Validate xray url #160
Conversation
9878122
to
611df08
Compare
611df08
to
ff7aafa
Compare
ff7aafa
to
e60da42
Compare
3168835
to
d356b6e
Compare
@hadarshjfrog I think it's worth adding a test to audit_test.go - configure a server with Xray URL only and validate we get JAS results |
d356b6e
to
80e61ff
Compare
audit_test.go
Outdated
@@ -620,3 +620,37 @@ func TestAuditOnEmptyProject(t *testing.T) { | |||
output := securityTests.PlatformCli.WithoutCredentials().RunCliCmdWithOutput(t, "audit", "--format="+string(format.SimpleJson)) | |||
securityTestUtils.VerifySimpleJsonJasResults(t, output, 0, 0, 0, 0, 0, 0, 0, 0, 0) | |||
} | |||
|
|||
// xray-url only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make the comment more informative?
audit_test.go
Outdated
securityTestUtils.VerifySimpleJsonJasResults(t, output, 0, 0, 0, 0, 0, 0, 0, 0, 0) | ||
} | ||
|
||
func getNoJasAuditMockCommandWithXrayUrl() components.Command { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use the function getNoJasAuditMockCommand
(I don't see any difference)
audit_test.go
Outdated
} | ||
|
||
func TestXrayAuditJasSimpleJsonWithXrayUrl(t *testing.T) { | ||
output := testXrayAuditJas(t, securityTests.PlatformCli, filepath.Join("jas", "jas"), "3", false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should create here a 'cliToRun' object, same in TestXrayAuditNotEntitledForJasWithXrayUrl
. Otherwise the test will use the default CLI configured to the integration test
baf77e2
to
ce26432
Compare
ce26432
to
9dfb59c
Compare
dev
branch.go vet ./...
.go fmt ./...
.When configuring
xray-url
only, without theurl
- the audit command didn't recognize them, and couldn't set JAS scanners: