diff --git a/commands/scanpullrequest/scanallpullrequests_test.go b/commands/scanpullrequest/scanallpullrequests_test.go index cdbae8cca..d56b9aa5e 100644 --- a/commands/scanpullrequest/scanallpullrequests_test.go +++ b/commands/scanpullrequest/scanallpullrequests_test.go @@ -18,7 +18,7 @@ import ( ) func initScanAllPullRequestsTest(t *testing.T) { - if !*utils.TestScanAllPullRequests || *utils.TestAll { + if !(*utils.TestScanAllPullRequests || *utils.TestAll) { t.Skip("Skipping Scan All Pull Requests tests. To run Scan All Pull Requests tests add the '--test.Scan-All-Pull-Requests' option.") } } diff --git a/commands/scanpullrequest/scanpullrequest_test.go b/commands/scanpullrequest/scanpullrequest_test.go index 5b2177513..158e8f73a 100644 --- a/commands/scanpullrequest/scanpullrequest_test.go +++ b/commands/scanpullrequest/scanpullrequest_test.go @@ -39,7 +39,7 @@ const ( ) func initScanPullRequestTest(t *testing.T) { - if !*utils.TestScanPullRequest || *utils.TestAll { + if !(*utils.TestScanPullRequest || *utils.TestAll) { t.Skip("Skipping Scan Pull Request tests. To run Scan Pull Request tests add the '--test.Scan-Pull-Request' option.") } } diff --git a/commands/scanrepository/scanmultiplerepositories_test.go b/commands/scanrepository/scanmultiplerepositories_test.go index d7cfbf2f3..495881080 100644 --- a/commands/scanrepository/scanmultiplerepositories_test.go +++ b/commands/scanrepository/scanmultiplerepositories_test.go @@ -27,7 +27,7 @@ var testScanMultipleRepositoriesConfigPath = filepath.Join("..", "testdata", "co var testRepositories = []string{"pip-repo", "npm-repo", "mvn-repo"} func initScanMultipleRepositoriesTest(t *testing.T) { - if !*utils.TestScanMultipleRepositories || *utils.TestAll { + if !(*utils.TestScanMultipleRepositories || *utils.TestAll) { t.Skip("Skipping Scan Multiple Repositories tests. To run Scan Multiple Repositories tests add the '--test.Scan-Multiple-Repositories' option.") } } diff --git a/commands/scanrepository/scanrepository_test.go b/commands/scanrepository/scanrepository_test.go index 897a4c247..4edf8badf 100644 --- a/commands/scanrepository/scanrepository_test.go +++ b/commands/scanrepository/scanrepository_test.go @@ -70,7 +70,7 @@ var testPackagesData = []struct { } func initScanRepositoryTest(t *testing.T) { - if !*utils.TestScanRepository || *utils.TestAll { + if !(*utils.TestScanRepository || *utils.TestAll) { t.Skip("Skipping Scan Repository tests. To run Scan Repository tests add the '--test.Scan-Repository' option.") } } diff --git a/commands/utils/depsutil_test.go b/commands/utils/depsutil_test.go index c397b7a2b..7eba02bc4 100644 --- a/commands/utils/depsutil_test.go +++ b/commands/utils/depsutil_test.go @@ -17,7 +17,7 @@ import ( var timestamp = time.Now().Unix() func initResolveDependencyTest(t *testing.T) { - if !*TestResolveDependency || *TestAll { + if !(*TestResolveDependency || *TestAll) { t.Skip("Skipping Resolve Dependency tests. To run Resolve Dependency tests add the '--test.Resolve-Dependency' option.") } } diff --git a/commands/utils/packagehandlers/packagehandlers_test.go b/commands/utils/packagehandlers/packagehandlers_test.go index cfa06df3c..ab173f901 100644 --- a/commands/utils/packagehandlers/packagehandlers_test.go +++ b/commands/utils/packagehandlers/packagehandlers_test.go @@ -34,7 +34,7 @@ type pipPackageRegexTest struct { } func initPackageHandlersTest(t *testing.T) { - if !*utils.TestPackageHandlers || *utils.TestAll { + if !(*utils.TestPackageHandlers || *utils.TestAll) { t.Skip("Skipping Package Handlers tests. To run Package Handlers tests add the '--test.Package-Handlers' option.") } }