Skip to content

Commit

Permalink
GoSec fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalb4doc committed Dec 25, 2024
1 parent 6947959 commit 6d9a373
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions artifactory/utils/commandsummary/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package commandsummary

import (
"os"
"testing"

testsutils "github.com/jfrog/jfrog-client-go/utils/tests"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -103,8 +103,9 @@ func TestAddGitHubTrackingToUrl(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
// Set up the environment variable
os.Setenv("GITHUB_WORKFLOW", test.envValue)
defer os.Unsetenv("GITHUB_WORKFLOW")

cleanup := testsutils.SetEnvWithCallbackAndAssert(t, "GITHUB_WORKFLOW", test.envValue)
defer cleanup()

// Call the function
result, err := addGitHubTrackingToUrl(test.url, test.section)
Expand Down

0 comments on commit 6d9a373

Please sign in to comment.