Skip to content

Commit

Permalink
test with exact paket version, use bootstrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzo committed Dec 15, 2017
1 parent 141e77c commit 3df6e5f
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 51 deletions.
Binary file added .paket/paket.bootstrapper.exe
Binary file not shown.
7 changes: 7 additions & 0 deletions .paket/paket.bootstrapper.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="PreferNuget" value="True"/>
<add key="PaketVersion" value="5.126.1"/>
</appSettings>
</configuration>
2 changes: 2 additions & 0 deletions e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ cat << EOF > /home/ide/.nuget/NuGet/NuGet.Config
</configuration>
EOF

mono /ide/work/.paket/paket.bootstrapper.exe

echo "Sleeping 4s to wait for server to be ready"
sleep 4

Expand Down
6 changes: 4 additions & 2 deletions e2e/stress/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ set -e
echo "Sleeping 4s to wait for server to be ready"
sleep 4

mono /ide/work/.paket/paket.bootstrapper.exe

STRESS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $STRESS_DIR

echo "paket update to download a bunch of packages"
cd paket
paket update
mono /ide/work/.paket/paket.exe update
echo "nuget push a bunch of packages"
./push_all.sh
cd ..
Expand All @@ -28,7 +30,7 @@ do
</packageSources>
</configuration>
EOF
bash -c "cd paket-$i && HOME=/home/ide/$i paket install -f" &
bash -c "cd paket-$i && HOME=/home/ide/$i mono /ide/work/.paket/paket.exe install -f" &
done

time wait
4 changes: 2 additions & 2 deletions e2e/test_one-exact-package/01_one_exact_package.bats
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ load '/opt/bats-assert/load.bash'
}

@test "paket install pinned package version" {
run /bin/bash -c "cd paket-pinned && paket install"
run /bin/bash -c "cd paket-pinned && mono /ide/work/.paket/paket.exe install"
refute_output --partial 'Could not download'
refute_output --partial 'went wrong'
assert_equal "$status" 0
}

@test "paket restore pinned package version" {
run /bin/bash -c "cd paket-locked && paket restore"
run /bin/bash -c "cd paket-locked && mono /ide/work/.paket/paket.exe restore"
refute_output --partial 'Could not download'
refute_output --partial 'went wrong'
assert_equal "$status" 0
Expand Down
12 changes: 2 additions & 10 deletions e2e/test_proxy/01_proxy.bats
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,17 @@ load '/opt/bats-assert/load.bash'
}

@test "paket install latest log4net version" {
run /bin/bash -c "cd paket && paket install"
run /bin/bash -c "cd paket && mono /ide/work/.paket/paket.exe install"
refute_output --partial 'Could not download'
refute_output --partial 'went wrong'
assert_equal "$status" 0
assert [ -e 'paket/packages/log4net' ]
}

@test "paket install with constraint (<= 2.0.8)" {
run /bin/bash -c "cd paket-constraint && paket install"
run /bin/bash -c "cd paket-constraint && mono /ide/work/.paket/paket.exe install"
refute_output --partial 'Could not download'
refute_output --partial 'went wrong'
assert_equal "$status" 0
assert [ -e 'paket-constraint/packages/log4net/log4net.2.0.8.nupkg' ]
}

@test "paket update with bug01" {
run /bin/bash -c "cd paket-bug01 && paket update"
refute_output --partial 'Could not download'
refute_output --partial 'went wrong'
refute_output --partial "Couldn't get package details"
assert_equal "$status" 0
}
34 changes: 0 additions & 34 deletions e2e/test_proxy/paket-bug01/paket.dependencies

This file was deleted.

6 changes: 3 additions & 3 deletions e2e/test_update-package/01_update_package.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ load '/opt/bats-assert/load.bash'
}

@test "paket update latest package version (1.0.0)" {
run /bin/bash -c "cd paket && paket update"
run /bin/bash -c "cd paket && mono /ide/work/.paket/paket.exe update"
refute_output --partial 'Could not download'
refute_output --partial 'went wrong'
assert_equal "$status" 0
Expand All @@ -39,15 +39,15 @@ load '/opt/bats-assert/load.bash'
}

@test "paket update latest package version (2.1.0)" {
run /bin/bash -c "cd paket && paket update"
run /bin/bash -c "cd paket && mono /ide/work/.paket/paket.exe update"
refute_output --partial 'Could not download'
refute_output --partial 'went wrong'
assert_equal "$status" 0
assert [ -e 'paket/packages/liget-two/liget-two.2.1.0.nupkg' ]
}

@test "paket install with constraint (< 2.0.0)" {
run /bin/bash -c "cd paket-constraint && paket install"
run /bin/bash -c "cd paket-constraint && mono /ide/work/.paket/paket.exe install"
refute_output --partial 'Could not download'
refute_output --partial 'went wrong'
assert_equal "$status" 0
Expand Down
1 change: 1 addition & 0 deletions tasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ case "${command}" in
;;
build_inputs)
build_inputs
mono /ide/work/.paket/paket.bootstrapper.exe
;;
itest)
ide "./tasks.sh build_inputs"
Expand Down

0 comments on commit 3df6e5f

Please sign in to comment.