Skip to content

Commit 41afe6a

Browse files
author
Ashley Penney
committed
Allow podman to run kitchen tests
Due to differences in how podman and docker treat volumes, we have to hack in a workaround for podman to start the chef container up before it runs a suite. Otherwise you get a failure to find the chef-client binary test-kitchen/kitchen-dokken#255 has more information on the cause
1 parent 8976ad6 commit 41afe6a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.kitchen.yml

+12
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ platforms:
6262
- RUN /usr/bin/apt-get install -y eatmydata
6363
- RUN echo /usr/lib/$(uname -m)-linux-gnu/libeatmydata.so >>/etc/ld.so.preload
6464

65+
# When using podman we have to manually start chef to workaround a volume issue
66+
lifecycle:
67+
pre_create: |
68+
if command -v podman >/dev/null 2>&1; then
69+
podman create --name chef-latest --replace docker.io/chef/chef:latest sh
70+
podman start chef-latest
71+
fi
72+
post_destroy: |
73+
if command -v podman >/dev/null 2>&1; then
74+
podman volume prune -f
75+
fi
76+
6577
suites:
6678
- name: accounts
6779
run_list:

0 commit comments

Comments
 (0)