Skip to content

Commit 0036661

Browse files
authored
Fix flaky tests (#385)
1 parent 1b300d6 commit 0036661

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: commands/audit/sca/pnpm/pnpm_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func TestBuildDependencyTreeLimitedDepth(t *testing.T) {
4444
name: "With transitive dependencies",
4545
treeDepth: "1",
4646
expectedUniqueDeps: []string{
47-
"npm://axios:1.8.1",
47+
"npm://axios:1.8.2",
4848
"npm://balaganjs:1.0.0",
4949
"npm://yargs:13.3.0",
5050
"npm://zen-website:1.0.0",
@@ -54,7 +54,7 @@ func TestBuildDependencyTreeLimitedDepth(t *testing.T) {
5454
Nodes: []*xrayUtils.GraphNode{
5555
{
5656
Id: "npm://balaganjs:1.0.0",
57-
Nodes: []*xrayUtils.GraphNode{{Id: "npm://axios:1.8.1"}, {Id: "npm://yargs:13.3.0"}},
57+
Nodes: []*xrayUtils.GraphNode{{Id: "npm://axios:1.8.2"}, {Id: "npm://yargs:13.3.0"}},
5858
},
5959
},
6060
},

Diff for: git_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"github.com/stretchr/testify/assert"
88

99
"github.com/jfrog/jfrog-cli-core/v2/common/format"
10+
"github.com/jfrog/jfrog-cli-core/v2/utils/coreutils"
1011
"github.com/jfrog/jfrog-cli-security/commands/git/contributors"
1112
securityTests "github.com/jfrog/jfrog-cli-security/tests"
1213
securityTestUtils "github.com/jfrog/jfrog-cli-security/tests/utils"
@@ -87,6 +88,9 @@ func TestGitAuditSimpleJson(t *testing.T) {
8788
}
8889

8990
func TestGitAuditViolationsWithIgnoreRule(t *testing.T) {
91+
if !coreutils.IsLinux() {
92+
t.Skip("Skipping test. This test only runs on Linux to avoid flaky tests when running in parallel tests.")
93+
}
9094
xrayVersion, xscVersion, testCleanUp := integration.InitGitTest(t, services.MinXrayVersionGitRepoKey)
9195
defer testCleanUp()
9296

0 commit comments

Comments
 (0)