mirror of
https://github.com/sbt/sbt.git
synced 2026-09-07 02:55:23 +02:00
Add non-reg tests for Nexus proxies
Ensure everything work fine again with those (things went bad at 1.0.0-RC1, because of the use of directory listings, that may not be exhaustive in proxies - or may be just empty, e.g. currently with nexus 3)
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
MAX_WAIT=120
|
||||
|
||||
wait_for() {
|
||||
TARGET="$1"
|
||||
I=0
|
||||
while ! curl "$TARGET"; do
|
||||
if [ "$I" -gt "$MAX_WAIT" ]; then
|
||||
echo "$TARGET not available after $MAX_WAIT seconds" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
I="$(( $I + 1 ))"
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
docker run -d -p 9081:8081 --name nexus sonatype/nexus:2.14.4
|
||||
wait_for "http://localhost:9081/nexus/content/repositories/central/"
|
||||
|
||||
docker run -d -p 9082:8081 --name nexus3 sonatype/nexus3:3.3.1
|
||||
wait_for "http://localhost:9082/repository/maven-central/"
|
||||
@@ -24,6 +24,10 @@ launchTestRepo() {
|
||||
./scripts/launch-test-repo.sh "$@"
|
||||
}
|
||||
|
||||
launchProxyRepos() {
|
||||
./scripts/launch-proxies.sh
|
||||
}
|
||||
|
||||
integrationTestsRequirements() {
|
||||
# Required for ~/.ivy2/local repo tests
|
||||
sbt ++2.11.11 coreJVM/publishLocal
|
||||
@@ -217,6 +221,9 @@ else
|
||||
runSbtShadingTests
|
||||
fi
|
||||
else
|
||||
# Required for the proxy tests (currently CentralNexus2ProxyTests and CentralNexus3ProxyTests)
|
||||
launchProxyRepos
|
||||
|
||||
runJvmTests
|
||||
|
||||
testBootstrap
|
||||
|
||||
Reference in New Issue
Block a user