-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsecondnode.bats
45 lines (36 loc) · 1.18 KB
/
secondnode.bats
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bats
load test_helper
@test "Test: Install plugin for driver ($driver) on node 2" {
#skip "This test works, faster for rev without it"
run $prefix2 docker plugin install --grant-all-permissions $driver $pluginopts
assert_success
}
@test "Test: Confirm volume is visible on second node (volume ls) using driver ($driver)" {
run $prefix2 docker volume ls
assert_line --partial "testvol"
}
@test "Start a container and mount the volume on node 2" {
run $prefix2 docker run -it -d --name mounter -v testvol:/data ubuntu /bin/bash
assert_success
}
@test "Confirm textfile contents on the volume from node 2" {
run $prefix2 -t docker exec -it mounter cat /data/foo.txt
assert_line --partial "testdata"
}
@test "Confirm checksum for binary file on node 2" {
run $prefix2 -t docker exec -it mounter md5sum --check /data/checksum
assert_success
}
@test "Destroy container on node 2" {
run $prefix2 docker stop mounter
run $prefix2 docker rm mounter
assert_success
}
@test "Remove volume" {
run $prefix2 docker volume rm testvol
assert_success
}
@test "Confirm volume is removed from docker ls" {
run $prefix2 docker volume ls
refute_output --partial 'testvol'
}