-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4ca999
commit cb85c8f
Showing
8 changed files
with
46 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" | ||
"github.com/jfrog/jfrog-cli-core/v2/xray/commands/utils" | ||
"github.com/jfrog/jfrog-cli/utils/tests" | ||
"testing" | ||
) | ||
|
||
func initXscTest(t *testing.T, minVersion string) { | ||
if !*tests.TestXsc { | ||
t.Skip("Skipping Xsc test. To run xsc test add the '-test.xsc=true' option.") | ||
} | ||
*tests.TestXray = true | ||
validateXscVersion(t, minVersion) | ||
} | ||
func validateXscVersion(t *testing.T, minVersion string) { | ||
err := coreutils.ValidateMinimumVersion(coreutils.Xsc, xrayDetails.XscVersion, minVersion) | ||
if err != nil { | ||
t.Skip(err) | ||
} | ||
} | ||
func TestXSCAudit(t *testing.T) { | ||
initXscTest(t, utils.XscMinVersion) | ||
testXrayAuditNpm(t, "json") | ||
} |