Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion registry-scanner/pkg/registry/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/image"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/options"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/registry/mocks"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"
Expand Down
2 changes: 0 additions & 2 deletions registry-scanner/pkg/registry/endpoints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

)

func TestInferRegistryEndpointFromPrefix(t *testing.T) {
Expand Down Expand Up @@ -426,4 +425,3 @@ func TestIsTransportValid(t *testing.T) {
assert.False(t, isTransportValid(transport), "Transport with invalid settings should be invalid")
})
}

8 changes: 4 additions & 4 deletions registry-scanner/pkg/registry/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ echo "AWS:mock-token-12345"
err := os.WriteFile(scriptPath, []byte(scriptContent), 0755)
require.NoError(t, err)
defer os.Remove(scriptPath)

// Clean up any existing log file
os.Remove("/tmp/test_ecr_calls.log")
defer os.Remove("/tmp/test_ecr_calls.log")
Expand Down Expand Up @@ -239,7 +239,7 @@ registries:

t.Run("Concurrent calls with unexpired credentials should not refetch", func(t *testing.T) {
var callCount int32

epYAML := `
registries:
- name: Test Registry
Expand All @@ -250,15 +250,15 @@ registries:
`
epl, err := ParseRegistryConfiguration(epYAML)
require.NoError(t, err)

err = AddRegistryEndpointFromConfig(epl.Items[0])
require.NoError(t, err)
ep, err := GetRegistryEndpoint(&image.ContainerImage{RegistryURL: "test.registry.io"})
require.NoError(t, err)

// Set environment variable
os.Setenv("TEST_CONCURRENT_CREDS", "user:pass")

// First call to set credentials
err = ep.SetEndpointCredentials(nil)
require.NoError(t, err)
Expand Down