@@ -25,48 +25,48 @@ function teardown() {
2525}
2626
2727@test " umoci gc [consistent]" {
28- image-verify " $IMAGE "
28+ image-verify " ${ IMAGE} "
2929
3030 # Initial gc.
31- umoci gc --image " $IMAGE "
31+ umoci gc --layout " ${ IMAGE} "
3232 [ " $status " -eq 0 ]
33- image-verify " $IMAGE "
33+ image-verify " ${ IMAGE} "
3434
3535 # Check how many blobs there were.
3636 sane_run find " $IMAGE /blobs" -type f
3737 [ " $status " -eq 0 ]
3838 nblobs=" ${# lines[@]} "
3939
4040 # Redo the gc.
41- umoci gc --image " $IMAGE "
41+ umoci gc --layout " ${ IMAGE} "
4242 [ " $status " -eq 0 ]
43- image-verify " $IMAGE "
43+ image-verify " ${ IMAGE} "
4444
4545 # Make sure that another gc run does nothing.
4646 sane_run find " $IMAGE /blobs" -type f
4747 [ " $status " -eq 0 ]
4848 [ " ${# lines[@]} " -eq " $nblobs " ]
4949
50- image-verify " $IMAGE "
50+ image-verify " ${ IMAGE} "
5151}
5252
5353@test " umoci gc" {
5454 BUNDLE=" $( setup_bundle) "
5555
56- image-verify " $IMAGE "
56+ image-verify " ${ IMAGE} "
5757
5858 # Initial gc.
59- umoci gc --image " $IMAGE "
59+ umoci gc --layout " ${ IMAGE} "
6060 [ " $status " -eq 0 ]
61- image-verify " $IMAGE "
61+ image-verify " ${ IMAGE} "
6262
6363 # Check how many blobs there were.
6464 sane_run find " $IMAGE /blobs" -type f
6565 [ " $status " -eq 0 ]
6666 nblobs=" ${# lines[@]} "
6767
6868 # Unpack the image.
69- umoci unpack --image " $IMAGE " --from " $ TAG" --bundle " $BUNDLE "
69+ umoci unpack --image " ${ IMAGE} : ${ TAG} " --bundle " $BUNDLE "
7070 [ " $status " -eq 0 ]
7171 bundle-verify " $BUNDLE "
7272
@@ -75,9 +75,9 @@ function teardown() {
7575 chmod +w " $BUNDLE /rootfs/etc/." && rm -rf " $BUNDLE /rootfs/etc"
7676
7777 # Repack the image under a new tag.
78- umoci repack --image " $IMAGE " --bundle " $BUNDLE " --tag " ${TAG} -new "
78+ umoci repack --image " ${ IMAGE} : ${TAG} -new " --bundle " $BUNDLE "
7979 [ " $status " -eq 0 ]
80- image-verify " $IMAGE "
80+ image-verify " ${ IMAGE} "
8181
8282 # Make sure the number of blobs has changed.
8383 sane_run find " $IMAGE /blobs" -type f
@@ -86,67 +86,67 @@ function teardown() {
8686 nblobs=" ${# lines[@]} "
8787
8888 # Make sure it is the same after doing a gc, because we used a new tag.
89- umoci gc --image " $IMAGE "
89+ umoci gc --layout " ${ IMAGE} "
9090 [ " $status " -eq 0 ]
91- image-verify " $IMAGE "
91+ image-verify " ${ IMAGE} "
9292
9393 # Make sure that another gc run does nothing.
9494 sane_run find " $IMAGE /blobs" -type f
9595 [ " $status " -eq 0 ]
9696 [ " ${# lines[@]} " -eq " $nblobs " ]
9797
9898 # Delete the old reference.
99- umoci tag --image " $IMAGE " rm --tag " $TAG "
99+ umoci tag --layout " ${ IMAGE} " rm --tag " ${ TAG} "
100100 [ " $status " -eq 0 ]
101- image-verify " $IMAGE "
101+ image-verify " ${ IMAGE} "
102102
103103 # Now do a gc which should delete some blobs.
104- umoci gc --image " $IMAGE "
104+ umoci gc --layout " ${ IMAGE} "
105105 [ " $status " -eq 0 ]
106- image-verify " $IMAGE "
106+ image-verify " ${ IMAGE} "
107107
108108 # Make sure that another gc run does nothing.
109109 sane_run find " $IMAGE /blobs" -type f
110110 [ " $status " -eq 0 ]
111111 [ " ${# lines[@]} " -lt " $nblobs " ]
112112
113- image-verify " $IMAGE "
113+ image-verify " ${ IMAGE} "
114114}
115115
116116@test " umoci gc [empty]" {
117- image-verify " $IMAGE "
117+ image-verify " ${ IMAGE} "
118118
119119 # Initial gc.
120- umoci gc --image " $IMAGE "
120+ umoci gc --layout " ${ IMAGE} "
121121 [ " $status " -eq 0 ]
122- image-verify " $IMAGE "
122+ image-verify " ${ IMAGE} "
123123
124124 # Check how many blobs there were.
125125 sane_run find " $IMAGE /blobs" -type f
126126 [ " $status " -eq 0 ]
127127 [ " ${# lines[@]} " -ne 0 ]
128128
129129 # Remove refs.
130- umoci tag --image " $IMAGE " list
130+ umoci tag --layout " ${ IMAGE} " list
131131 [ " $status " -eq 0 ]
132132 [ " ${# lines[@]} " -gt 0 ]
133- image-verify " $IMAGE "
133+ image-verify " ${ IMAGE} "
134134
135135 for line in " ${lines[*]} " ; do
136- umoci tag --image " $IMAGE " rm --tag " $( echo " $line " | awk ' { print $1 }' ) "
136+ umoci tag --layout " ${ IMAGE} " rm --tag " $( echo " $line " | awk ' { print $1 }' ) "
137137 [ " $status " -eq 0 ]
138- image-verify " $IMAGE "
138+ image-verify " ${ IMAGE} "
139139 done
140140
141141 # Do a gc, which should remove all blobs.
142- umoci gc --image " $IMAGE "
142+ umoci gc --layout " ${ IMAGE} "
143143 [ " $status " -eq 0 ]
144- image-verify " $IMAGE "
144+ image-verify " ${ IMAGE} "
145145
146146 # Check how many blobs there were.
147147 sane_run find " $IMAGE /blobs" -type f
148148 [ " $status " -eq 0 ]
149149 [ " ${# lines[@]} " -eq 0 ]
150150
151- image-verify " $IMAGE "
151+ image-verify " ${ IMAGE} "
152152}
0 commit comments