artmigrator/repository/nexus/nexus_test.go
2024-11-19 23:13:06 +03:00

21 lines
459 B
Go

package nexus
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetArtifacts(t *testing.T) {
client := NewClient("https://nexus.example.com", "user", "pass")
artifacts, err := client.GetArtifacts("test-repo")
assert.NoError(t, err)
assert.NotEmpty(t, artifacts)
_, err := ParseMavenArtifact("invalid-artifact")
if err == nil {
t.Errorf("Expected error for invalid artifact, but got nil")
}
}