Skip to content

Commit

Permalink
ci: Update nexus repository manager in tests and use multi arch image…
Browse files Browse the repository at this point in the history
… build by datadrivers fork

Additional:
- fix tests for new nexus version
  • Loading branch information
anmoel committed Oct 11, 2023
1 parent 000771f commit aa07b81
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 21 deletions.
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

0 comments on commit aa07b81

Please sign in to comment.