Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Update nexus repository manager in tests and use multi arch image… #128

Merged
merged 1 commit into from
Oct 11, 2023
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Sonatype Nexus Golang Client

Implemented and tested with Sonatype Nexus `3.43.0-01`.
Implemented and tested with Sonatype Nexus `3.61.0-02`.

## Development and testing

Expand Down
4 changes: 2 additions & 2 deletions nexus3/pkg/repository/npm/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ func TestNpmProxyRepository(t *testing.T) {

updatedRepo := repo
updatedRepo.Online = false
updatedRepo.RemoveQuarantined = true
updatedRepo.RemoveNonCataloged = false

err = service.Proxy.Update(repo.Name, updatedRepo)
assert.Nil(t, err)
generatedRepo, err = service.Proxy.Get(updatedRepo.Name)
assert.Nil(t, err)
assert.Equal(t, updatedRepo.Online, generatedRepo.Online)
assert.Equal(t, updatedRepo.Npm, generatedRepo.Npm)
assert.Equal(t, updatedRepo.RemoveNonCataloged, generatedRepo.RemoveNonCataloged)

service.Proxy.Delete(repo.Name)
assert.Nil(t, err)
Expand Down
1 change: 0 additions & 1 deletion nexus3/pkg/security/realm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ func TestSecurityRealmsActive(t *testing.T) {
assert.NotNil(t, activeRealms)
assert.Greater(t, len(activeRealms), 0)
assert.Contains(t, activeRealms, "NexusAuthenticatingRealm")
assert.Contains(t, activeRealms, "NexusAuthorizingRealm")
}

func TestSecurityRealmsAvailable(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion scripts/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export NEXUS_VERSION=3.43.0
export NEXUS_IMAGE=ghcr.io/datadrivers/docker-nexus3
export NEXUS_VERSION=3.61.0
export NEXUS_PORT=8081
16 changes: 0 additions & 16 deletions scripts/script.source
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,8 @@ else
echo "since no license file detected at ${_license_file}."
fi

case $(determine_local_architecture) in
"arm64" )
echo "Determined architecture: arm64"
NEXUS_IMAGE=klo2k/nexus3
;;
"x86_64" )
echo "Determined architecture: x86_64"
NEXUS_IMAGE=sonatype/nexus3
;;
* )
echo "Could not determine architecture" ;;
esac

# docker-compose options
COMPOSE_PROFILES=${NEXUS_TYPE}
export COMPOSE_PROFILES
COMPOSE_PROJECT_NAME=nexus-${NEXUS_TYPE}
export COMPOSE_PROJECT_NAME

# arch dependent nexus image selection
export NEXUS_IMAGE