mirror of
https://github.com/rgl/nexus-vagrant.git
synced 2026-09-30 00:31:11 +02:00
show the response body when there is an error
This commit is contained in:
@@ -23,7 +23,7 @@ popd
|
||||
# see https://help.sonatype.com/en/apt-repositories.html
|
||||
apt-get install -y curl
|
||||
curl \
|
||||
--fail \
|
||||
--fail-with-body \
|
||||
--show-error \
|
||||
--user 'alice.doe:password' \
|
||||
--header 'Content-Type: multipart/form-data' \
|
||||
|
||||
@@ -13,7 +13,7 @@ mkdir -p tmp/use-npm-repository && cd tmp/use-npm-repository
|
||||
|
||||
# install node LTS.
|
||||
# see https://github.com/nodesource/distributions#debinstall
|
||||
curl -sL --fail --show-error https://deb.nodesource.com/setup_24.x | bash
|
||||
curl -sL --fail-with-body --show-error https://deb.nodesource.com/setup_24.x | bash
|
||||
apt-get install -y nodejs
|
||||
node --version
|
||||
npm --version
|
||||
|
||||
@@ -14,8 +14,8 @@ apt-get install -y curl
|
||||
# see https://help.sonatype.com/display/NXRM3/Raw+Repositories+and+Maven+Sites#RawRepositoriesandMavenSites-UploadingFilestoHostedRawRepositories
|
||||
expected='this is an adhoc package'
|
||||
echo "$expected" >package-1.0.0.txt
|
||||
curl --silent --fail --show-error --user 'alice.doe:password' --upload-file package-1.0.0.txt https://$nexus_domain/repository/adhoc-package/package-1.0.0.txt
|
||||
curl --silent --fail-with-body --show-error --user 'alice.doe:password' --upload-file package-1.0.0.txt https://$nexus_domain/repository/adhoc-package/package-1.0.0.txt
|
||||
|
||||
# download.
|
||||
actual=$(curl --silent --fail --show-error https://$nexus_domain/repository/adhoc-package/package-1.0.0.txt)
|
||||
actual=$(curl --silent --fail-with-body --show-error https://$nexus_domain/repository/adhoc-package/package-1.0.0.txt)
|
||||
[ "$actual" = "$expected" ] || (echo 'upload adhoc package test failed' && false)
|
||||
|
||||
Reference in New Issue
Block a user