Skip to content

Commit 4ecf2a2

Browse files
authored
Merge pull request #702 from navidys/fixbug_container_exec_enter_key
Bats skip tests feature
2 parents 5bb0aac + fad7025 commit 4ecf2a2

7 files changed

Lines changed: 129 additions & 0 deletions

File tree

test/001-image.bats

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ load helpers_tui
88

99

1010
@test "image search and pull" {
11+
check_skip "image_search"
12+
1113
podman image rm busybox || echo done
1214

1315
# switch to images view
@@ -28,6 +30,8 @@ load helpers_tui
2830
}
2931

3032
@test "image save" {
33+
check_skip "image_save"
34+
3135
podman image pull docker.io/library/busybox || echo done
3236
[ -f "${TEST_IMAGE_SAVE_PATH}" ] && /bin/rm -rf $TEST_IMAGE_SAVE_PATH
3337

@@ -52,6 +56,8 @@ load helpers_tui
5256
}
5357

5458
@test "image import" {
59+
check_skip "image_import"
60+
5561
/bin/rm -rf ${TEST_IMAGE_SAVE_PATH} || echo done
5662
podman image save -o ${TEST_IMAGE_SAVE_PATH} busybox:latest || echo done
5763
# switch to images view
@@ -76,6 +82,8 @@ load helpers_tui
7682
}
7783

7884
@test "image build" {
85+
check_skip "image_build"
86+
7987
podman image pull docker.io/library/busybox || echo done
8088
podman image rm ${TEST_IMAGE_BUILD_REPOSITORY}/${TEST_IMAGE_BUILD_CONTEXT_DIR} || echo done
8189

@@ -103,6 +111,8 @@ load helpers_tui
103111
}
104112

105113
@test "image diff" {
114+
check_skip "image_diff"
115+
106116
# switch to images view
107117
# select busybox image from list
108118
# select diff command from image commands dialog
@@ -118,6 +128,8 @@ load helpers_tui
118128
}
119129

120130
@test "image history" {
131+
check_skip "image_history"
132+
121133
# switch to images view
122134
# select busybox image from list
123135
# select history command from image commands dialog
@@ -133,6 +145,8 @@ load helpers_tui
133145
}
134146

135147
@test "image inspect" {
148+
check_skip "image_inspect"
149+
136150
image_id=$(podman image ls --sort repository --noheading | nl -v 0 | grep 'busybox ' | awk '{print $4}')
137151

138152
# switch to images view
@@ -150,6 +164,8 @@ load helpers_tui
150164
}
151165

152166
@test "image tag" {
167+
check_skip "image_tag"
168+
153169
# switch to images view
154170
# select busybox image from list
155171
# select tag command from image commands dialog
@@ -164,6 +180,8 @@ load helpers_tui
164180
}
165181

166182
@test "image untag" {
183+
check_skip "image_tag"
184+
167185
# switch to images view
168186
# select busybox image from list
169187
# select untag command from image commands dialog
@@ -181,6 +199,8 @@ load helpers_tui
181199
}
182200

183201
@test "image remove" {
202+
check_skip "image_remove"
203+
184204
run_helper podman image ls --format "'{{ .Repository }}'"
185205
before="$output"
186206

@@ -203,6 +223,8 @@ load helpers_tui
203223
}
204224

205225
@test "image prune" {
226+
check_skip "image_prune"
227+
206228
podman image pull busybox
207229

208230
# switch to images view

test/002-volume.bats

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ load helpers
77
load helpers_tui
88

99
@test "volume create" {
10+
check_skip "volume_create"
11+
1012
podman volume rm $TEST_VOLUME_NAME || echo done
1113

1214
# switch to volumes view
@@ -25,6 +27,8 @@ load helpers_tui
2527
}
2628

2729
@test "volume inspect" {
30+
check_skip "volume_inspect"
31+
2832
# switch to volumes view
2933
# select test volume from list
3034
# select inspect command from volume commands dialog
@@ -41,6 +45,8 @@ load helpers_tui
4145
}
4246

4347
@test "volume remove" {
48+
check_skip "volume_remove"
49+
4450
# switch to volumes view
4551
# select test volume from list
4652
# select remove command from volume commands dialog
@@ -56,6 +62,8 @@ load helpers_tui
5662
}
5763

5864
@test "volume prune" {
65+
check_skip "volume_prune"
66+
5967
run_helper podman volume create $TEST_VOLUME_NAME
6068

6169
# switch to volumes view

test/003-network.bats

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ load helpers
77
load helpers_tui
88

99
@test "network connect" {
10+
check_skip "network_connect"
11+
1012
podman network rm $TEST_NETWORK_CONNECT || echo done
1113
podman container rm -f $TEST_CONTAINER_NAME || echo done
1214
podman container create --name $TEST_CONTAINER_NAME docker.io/library/busybox || echo done
@@ -33,6 +35,8 @@ load helpers_tui
3335
}
3436

3537
@test "network disconnect" {
38+
check_skip "network_disconnect"
39+
3640
# switch to networks view
3741
# select disconnect command from network commands dialog
3842
# select container
@@ -50,6 +54,8 @@ load helpers_tui
5054
}
5155

5256
@test "network create" {
57+
check_skip "network_create"
58+
5359
podman network rm $TEST_NETWORK_NAME || echo done
5460

5561
# switch to networks view
@@ -70,6 +76,8 @@ load helpers_tui
7076
}
7177

7278
@test "network inspect" {
79+
check_skip "network_inspect"
80+
7381
# switch to networks view
7482
# select test network from list
7583
# select inspect command from network commands dialog
@@ -86,6 +94,8 @@ load helpers_tui
8694
}
8795

8896
@test "network remove" {
97+
check_skip "network_remove"
98+
8999
# switch to networks view
90100
# select test network from list
91101
# select remove command from network commands dialog
@@ -101,6 +111,8 @@ load helpers_tui
101111
}
102112

103113
@test "network prune" {
114+
check_skip "network_prune"
115+
104116
run_helper podman network create $TEST_NETWORK_NAME
105117

106118
# switch to networks view

test/004-pod.bats

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ load helpers
77
load helpers_tui
88

99
@test "pod create (resource)" {
10+
check_skip "pod_create_resource"
11+
1012
podman pod rm -f $TEST_POD_NAME || echo done
1113
podman image pull pause:3.5 || echo done
1214

@@ -38,6 +40,8 @@ load helpers_tui
3840
}
3941

4042
@test "pod create (networking, security)" {
43+
check_skip "pod_create_networking"
44+
4145
podman pod rm -f $TEST_POD_NAME || echo done
4246
podman network rm $TEST_POD_NETWORK_NAME || echo done
4347
podman image pull pause:3.5 || echo done
@@ -76,6 +80,8 @@ load helpers_tui
7680
}
7781

7882
@test "pod start" {
83+
check_skip "pod_start"
84+
7985
# switch to pods view
8086
# select test pod from list
8187
# select start command from pod commands dialog
@@ -89,6 +95,8 @@ load helpers_tui
8995
}
9096

9197
@test "pod pause" {
98+
check_skip "pod_pause"
99+
92100
# switch to pods view
93101
# select test pod from list
94102
# select pause command from pod commands dialog
@@ -102,6 +110,8 @@ load helpers_tui
102110
}
103111

104112
@test "pod unpause" {
113+
check_skip "pod_unpause"
114+
105115
# switch to pods view
106116
# select test pod from list
107117
# select unpause command from pod commands dialog
@@ -115,6 +125,8 @@ load helpers_tui
115125
}
116126

117127
@test "pod stop" {
128+
check_skip "pod_stop"
129+
118130
# switch to pods view
119131
# select test pod from list
120132
# select stop command from pod commands dialog
@@ -128,6 +140,8 @@ load helpers_tui
128140
}
129141

130142
@test "pod restart" {
143+
check_skip "pod_restart"
144+
131145
# switch to pods view
132146
# select test pod from list
133147
# select restart command from pod commands dialog
@@ -141,6 +155,8 @@ load helpers_tui
141155
}
142156

143157
@test "pod kill" {
158+
check_skip "pod_kill"
159+
144160
# switch to pods view
145161
# select test pod from list
146162
# select kill command from pod commands dialog
@@ -154,6 +170,8 @@ load helpers_tui
154170
}
155171

156172
@test "pod inspect" {
173+
check_skip "pod_inspect"
174+
157175
# switch to pods view
158176
# select test pod from list
159177
# select inspect command from pod commands dialog
@@ -169,6 +187,8 @@ load helpers_tui
169187
}
170188

171189
@test "pod remove" {
190+
check_skip "pod_remove"
191+
172192
# switch to pods view
173193
# select test pod from list
174194
# select remove command from pod commands dialog
@@ -185,6 +205,8 @@ load helpers_tui
185205
}
186206

187207
@test "pod prune" {
208+
check_skip "pod_prune"
209+
188210
podman pod create --name $TEST_POD_NAME --label $TEST_LABEL || echo done
189211
podman pod start $TEST_POD_NAME || echo done
190212
podman pod stop $TEST_POD_NAME || echo done

0 commit comments

Comments
 (0)