From 1430c94d96fae244f63b7ab25112cfc895b7ee4b Mon Sep 17 00:00:00 2001 From: Mikhail Gordeev Date: Thu, 10 Nov 2022 19:31:07 +0300 Subject: [PATCH] Add var symlinks check to docker tests --- cloud_build/image_tests/docker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cloud_build/image_tests/docker.py b/cloud_build/image_tests/docker.py index 07036eb..a2d5c74 100644 --- a/cloud_build/image_tests/docker.py +++ b/cloud_build/image_tests/docker.py @@ -13,10 +13,17 @@ CMD ["/bin/bash"]""" f.write(dockerfile) name = f'cloud_build_test_{abs(hash(image))}' + test_commads = [ + 'apt-get update', + 'apt-get install -y vim-console', + '[ -L /var/run ]', + '[ -L /var/lock ]' + ] + test_commad = " && ".join(test_commads) commands = [ f'docker build --rm --tag={name} .', f"docker run --rm {name} /bin/sh -c " - "'apt-get update && apt-get install -y vim-console'", + f"'{test_commad}'", f'docker image rm {name}', ]