diff --git a/test/fetchzip.sh b/test/fetchzip.sh index 6d5e755..d5917d4 100755 --- a/test/fetchzip.sh +++ b/test/fetchzip.sh @@ -14,14 +14,14 @@ trap 'kill $PID 2>/dev/null || true' exit echo "Trying to download gitcompatibledubpackage (1.0.4)" -timeout 1s ${DUB} fetch gitcompatibledubpackage --version=1.0.4 --skip-registry=all --registry=http://localhost:$PORT +timeout 1s ${DUB} fetch gitcompatibledubpackage@1.0.4 --skip-registry=all --registry=http://localhost:$PORT if [ $? -eq 124 ]; then die $LINENO 'Fetching from responsive registry should not time-out.' fi -${DUB} remove gitcompatibledubpackage --non-interactive --version=1.0.4 +${DUB} remove gitcompatibledubpackage@1.0.4 echo "Downloads should be retried when the zip is corrupted - gitcompatibledubpackage (1.0.3)" -zipOut=$(! timeout 1s ${DUB} fetch gitcompatibledubpackage --version=1.0.3 --skip-registry=all --registry=http://localhost:$PORT 2>&1) +zipOut=$(! timeout 1s ${DUB} fetch gitcompatibledubpackage@1.0.3 --skip-registry=all --registry=http://localhost:$PORT 2>&1) rc=$? if ! zipCount=$(grep -Fc 'Failed to extract zip archive' <<<"$zipOut") || [ "$zipCount" -lt 3 ] ; then @@ -37,7 +37,7 @@ fi echo "HTTP status errors on downloads should be retried - gitcompatibledubpackage (1.0.2)" -retryOut=$(! timeout 1s ${DUB} fetch gitcompatibledubpackage --version=1.0.2 --skip-registry=all --registry=http://localhost:$PORT --vverbose 2>&1) +retryOut=$(! timeout 1s ${DUB} fetch gitcompatibledubpackage@1.0.2 --skip-registry=all --registry=http://localhost:$PORT --vverbose 2>&1) rc=$? if ! retryCount=$(echo "$retryOut" | grep -Fc 'Bad Gateway') || [ "$retryCount" -lt 3 ] ; then echo '========== +Output was ==========' >&2 @@ -52,8 +52,8 @@ fi echo "HTTP status errors on downloads should retry with fallback mirror - gitcompatibledubpackage (1.0.2)" -timeout 1s "$DUB" fetch gitcompatibledubpackage --version=1.0.2 --skip-registry=all --registry="http://localhost:$PORT http://localhost:$PORT/fallback" +timeout 1s "$DUB" fetch gitcompatibledubpackage@1.0.2 --skip-registry=all --registry="http://localhost:$PORT http://localhost:$PORT/fallback" if [ $? -eq 124 ]; then die $LINENO 'Fetching from responsive registry should not time-out.' fi -${DUB} remove gitcompatibledubpackage --non-interactive --version=1.0.2 +${DUB} remove gitcompatibledubpackage@1.0.2 diff --git a/test/interactive-remove.sh b/test/interactive-remove.sh index c3148d1..fd65ab8 100755 --- a/test/interactive-remove.sh +++ b/test/interactive-remove.sh @@ -9,15 +9,15 @@ # we need to nuke every `dub` version in the user cache... $DUB remove dub -n || true -$DUB fetch dub --version=1.9.0 && [ -d $HOME/.dub/packages/dub-1.9.0/dub ] -$DUB fetch dub --version=1.10.0 && [ -d $HOME/.dub/packages/dub-1.10.0/dub ] +$DUB fetch dub@1.9.0 && [ -d $HOME/.dub/packages/dub-1.9.0/dub ] +$DUB fetch dub@1.10.0 && [ -d $HOME/.dub/packages/dub-1.10.0/dub ] echo 1 | $DUB remove dub | tr -d '\n' | grep --ignore-case 'select.*1\.9\.0.*1\.10\.0.*' if [ -d $HOME/.dub/packages/dub-1.9.0/dub ]; then die $LINENO 'Failed to remove dub-1.9.0' fi -$DUB fetch dub --version=1.9.0 && [ -d $HOME/.dub/packages/dub-1.9.0/dub ] +$DUB fetch dub@1.9.0 && [ -d $HOME/.dub/packages/dub-1.9.0/dub ] # EOF aborts remove echo -xn '' | $DUB remove dub if [ ! -d $HOME/.dub/packages/dub-1.9.0/dub ] || [ ! -d $HOME/.dub/packages/dub-1.10.0/dub ]; then @@ -30,7 +30,7 @@ die $LINENO 'Failed to remove all version of dub' fi -$DUB fetch dub --version=1.9.0 && [ -d $HOME/.dub/packages/dub-1.9.0/dub ] +$DUB fetch dub@1.9.0 && [ -d $HOME/.dub/packages/dub-1.9.0/dub ] $DUB fetch dub@1.10.0 && [ -d $HOME/.dub/packages/dub-1.10.0/dub ] # is non-interactive with `--version=` $DUB remove dub@1.9.0 diff --git a/test/issue1180-local-cache-broken.sh b/test/issue1180-local-cache-broken.sh index 376ce91..41a8588 100755 --- a/test/issue1180-local-cache-broken.sh +++ b/test/issue1180-local-cache-broken.sh @@ -16,6 +16,6 @@ echo "Trying to download maven-dubpackage (1.0.5)" "$DUB" upgrade --root="$DIR/issue1180-local-cache-broken" --cache=local --skip-registry=all --registry=mvn+http://localhost:$PORT/maven/release/dubpackages -if ! "$DUB" remove maven-dubpackage --root="$DIR/issue1180-local-cache-broken" --non-interactive --version=1.0.5 2>/dev/null; then +if ! "$DUB" remove maven-dubpackage@1.0.5 --root="$DIR/issue1180-local-cache-broken" --non-interactive 2>/dev/null; then die $LINENO 'DUB did not install package from maven registry.' fi diff --git a/test/issue1401-filesystem-supplier.sh b/test/issue1401-filesystem-supplier.sh index 9811c32..18d1fcd 100755 --- a/test/issue1401-filesystem-supplier.sh +++ b/test/issue1401-filesystem-supplier.sh @@ -9,20 +9,20 @@ echo "Trying to get fs-sdl-dubpackage (1.0.5)" ${DUB} fetch fs-sdl-dubpackage --version=1.0.5 --skip-registry=all --registry=file://"$DIR"/issue1401-file-system-pkg-supplier -if ! ${DUB} remove fs-sdl-dubpackage --non-interactive --version=1.0.5 2>/dev/null; then +if ! ${DUB} remove fs-sdl-dubpackage@1.0.5 2>/dev/null; then die $LINENO 'DUB did not install package from file system.' fi echo "Trying to get fs-sdl-dubpackage (latest)" ${DUB} fetch fs-sdl-dubpackage --skip-registry=all --registry=file://"$DIR"/issue1401-file-system-pkg-supplier -if ! ${DUB} remove fs-sdl-dubpackage --non-interactive --version=1.0.6 2>/dev/null; then +if ! ${DUB} remove fs-sdl-dubpackage@1.0.6 2>/dev/null; then die $LINENO 'DUB did not install latest package from file system.' fi echo "Trying to get fs-json-dubpackage (1.0.7)" -${DUB} fetch fs-json-dubpackage --version=1.0.7 --skip-registry=all --registry=file://"$DIR"/issue1401-file-system-pkg-supplier +${DUB} fetch fs-json-dubpackage@1.0.7 --skip-registry=all --registry=file://"$DIR"/issue1401-file-system-pkg-supplier -if ! ${DUB} remove fs-json-dubpackage --non-interactive --version=1.0.7 2>/dev/null; then +if ! ${DUB} remove fs-json-dubpackage@1.0.7 2>/dev/null; then die $LINENO 'DUB did not install package from file system.' fi diff --git a/test/issue1416-maven-repo-pkg-supplier.sh b/test/issue1416-maven-repo-pkg-supplier.sh index 4e0b32d..4b65f52 100755 --- a/test/issue1416-maven-repo-pkg-supplier.sh +++ b/test/issue1416-maven-repo-pkg-supplier.sh @@ -14,16 +14,16 @@ trap 'kill $PID 2>/dev/null || true' exit echo "Trying to download maven-dubpackage (1.0.5)" -${DUB} fetch maven-dubpackage --version=1.0.5 --skip-registry=all --registry=mvn+http://localhost:$PORT/maven/release/dubpackages +${DUB} fetch maven-dubpackage@1.0.5 --skip-registry=all --registry=mvn+http://localhost:$PORT/maven/release/dubpackages -if ! ${DUB} remove maven-dubpackage --non-interactive --version=1.0.5 2>/dev/null; then +if ! ${DUB} remove maven-dubpackage@1.0.5 2>/dev/null; then die $LINENO 'DUB did not install package from maven registry.' fi echo "Trying to download maven-dubpackage (latest)" ${DUB} fetch maven-dubpackage --skip-registry=all --registry=mvn+http://localhost:$PORT/maven/release/dubpackages -if ! ${DUB} remove maven-dubpackage --non-interactive --version=1.0.6 2>/dev/null; then +if ! ${DUB} remove maven-dubpackage@1.0.6 2>/dev/null; then die $LINENO 'DUB fetch did not install latest package from maven registry.' fi diff --git a/test/issue1524-maven-upgrade-dependency-tree.sh b/test/issue1524-maven-upgrade-dependency-tree.sh index a8b2c32..05dd22f 100755 --- a/test/issue1524-maven-upgrade-dependency-tree.sh +++ b/test/issue1524-maven-upgrade-dependency-tree.sh @@ -17,11 +17,11 @@ echo "Trying to download maven-dubpackage-a (1.0.5) with dependency to maven-dubpackage-b (1.0.6)" ${DUB} upgrade --root "$DIR/issue1524-maven-upgrade-dependency-tree" --skip-registry=standard --registry=mvn+http://localhost:$PORT/maven/release/dubpackages -if ! ${DUB} remove maven-dubpackage-a --non-interactive --version=1.0.5 2>/dev/null; then +if ! ${DUB} remove maven-dubpackage-a@1.0.5 2>/dev/null; then die $LINENO 'DUB did not install package "maven-dubpackage-a" from maven registry.' fi -if ! ${DUB} remove maven-dubpackage-b --non-interactive --version=1.0.6 2>/dev/null; then +if ! ${DUB} remove maven-dubpackage-b@1.0.6 2>/dev/null; then die $LINENO 'DUB did not install package "maven-dubpackage-b" from maven registry.' fi diff --git a/test/issue1567-fetch-sub-package.sh b/test/issue1567-fetch-sub-package.sh index 544ef63..62c0678 100755 --- a/test/issue1567-fetch-sub-package.sh +++ b/test/issue1567-fetch-sub-package.sh @@ -7,6 +7,6 @@ ${DUB} remove $packname --non-interactive 2>/dev/null || true ${DUB} fetch "$packname:$sub_packagename" --skip-registry=all --registry=file://"$DIR"/issue1567-fetch-sub-package -if ! ${DUB} remove $packname --non-interactive --version=1.0.1 2>/dev/null; then +if ! ${DUB} remove $packname@1.0.1 2>/dev/null; then die $LINENO 'DUB did not install package $packname:$sub_packagename.' fi