Skip to content

Commit 376699e

Browse files
committed
Merge remote-tracking branch 'origin/dev' into XRAY-129870-python-hyphens-fix
2 parents 953c56a + f0eb9c7 commit 376699e

40 files changed

+980
-698
lines changed

artifactory_test.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ func TestDependencyResolutionFromArtifactory(t *testing.T) {
113113
projectType: project.Poetry,
114114
},
115115
}
116-
securityIntegrationTestUtils.CreateJfrogHomeConfig(t, "", true)
117-
defer securityTestUtils.CleanTestsHomeEnv()
116+
cleanUp := securityIntegrationTestUtils.UseTestHomeWithDefaultXrayConfig(t)
117+
defer cleanUp()
118118

119119
for _, testCase := range testCases {
120120
t.Run(testCase.projectType.String(), func(t *testing.T) {
@@ -271,8 +271,8 @@ func TestUploadCdxCmdCommand(t *testing.T) {
271271
// Create a temporary cdx file with suffix .cdx.json to upload
272272
tempDirPath, createTempDirCallback := coreTests.CreateTempDirWithCallbackAndAssert(t)
273273
defer createTempDirCallback()
274-
securityIntegrationTestUtils.CreateJfrogHomeConfig(t, tempDirPath, true)
275-
defer securityTestUtils.CleanTestsHomeEnv()
274+
cleanUp := securityIntegrationTestUtils.CreateJfrogHomeConfig(t, tempDirPath, securityTests.RtDetails, true)
275+
defer cleanUp()
276276
cdxFileToUpload := getTestCdxFile(t, tempDirPath)
277277
// Configure the repository to upload the cdx file to
278278
var repoPath string
@@ -368,7 +368,9 @@ func getTestCdxFile(t *testing.T, tempDir string) string {
368368
cdxFilePath := filepath.Join(tempDir, fmt.Sprintf("upload-integration-test-%s.cdx.json", utils.GetCurrentTimeUnix()))
369369
file, err := os.Create(cdxFilePath)
370370
assert.NoError(t, err)
371-
defer file.Close()
371+
defer func() {
372+
assert.NoError(t, file.Close())
373+
}()
372374
// Write the BOM to the file
373375
assert.NoError(t, cyclonedx.NewBOMEncoder(file, cyclonedx.BOMFileFormatJSON).SetPretty(true).Encode(bom))
374376
return cdxFilePath

0 commit comments

Comments
 (0)