From 8dfb9dc968f9ece0e1d17512db9c827ec5846b6e Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 28 Feb 2022 11:26:11 -0800 Subject: [PATCH] Add more robust testing of the registry We use a non trivial image now (the registry's image in fact) and then push with 4 processes at a time every time we push to the test registry. The idea here is we're generating concurrency in the system that should trip over the bugs that we are finding if they still exist. Change-Id: I4f03132fa0fad6f40806030b14d429d29036a42f --- playbooks/functional-test/docker.yaml | 5 ++++- playbooks/functional-test/podman.yaml | 5 ++++- playbooks/functional-test/restricted.yaml | 5 ++++- playbooks/functional-test/run.yaml | 1 + playbooks/functional-test/setup.yaml | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/playbooks/functional-test/docker.yaml b/playbooks/functional-test/docker.yaml index b539336..721b5a7 100644 --- a/playbooks/functional-test/docker.yaml +++ b/playbooks/functional-test/docker.yaml @@ -20,7 +20,10 @@ command: docker login localhost:9000 -u testuser -p testpass - name: Push the test image to the registry - command: docker push localhost:9000/test/image + # Use a lot of concurrency to check registry with concurrent pushes + shell: printf "1\n2\n3\n4\n" | xargs -P 4 -I DNE docker push localhost:9000/test/image + args: + executable: /bin/bash - name: Remove the test image from the local cache command: docker rmi localhost:9000/test/image diff --git a/playbooks/functional-test/podman.yaml b/playbooks/functional-test/podman.yaml index 33054d9..4c9027f 100644 --- a/playbooks/functional-test/podman.yaml +++ b/playbooks/functional-test/podman.yaml @@ -20,7 +20,10 @@ command: podman login localhost:9000 -u testuser -p testpass - name: Push the test image to the registry - command: podman push localhost:9000/test/image + # Use a lot of concurrency to check registry with concurrent pushes + shell: printf "1\n2\n3\n4\n" | xargs -P 4 -I DNE podman push localhost:9000/test/image + args: + executable: /bin/bash - name: Remove the test image from the local cache command: podman rmi localhost:9000/test/image diff --git a/playbooks/functional-test/restricted.yaml b/playbooks/functional-test/restricted.yaml index a89d802..a9d2743 100644 --- a/playbooks/functional-test/restricted.yaml +++ b/playbooks/functional-test/restricted.yaml @@ -21,7 +21,10 @@ command: docker login localhost:9000 -u writeuser -p writepass - name: Push the test image to the registry - command: docker push localhost:9000/test/image + # Use a lot of concurrency to check registry with concurrent pushes + shell: printf "1\n2\n3\n4\n" | xargs -P 4 -I DNE docker push localhost:9000/test/image + args: + executable: /bin/bash - name: Remove the test image from the local cache command: docker rmi localhost:9000/test/image diff --git a/playbooks/functional-test/run.yaml b/playbooks/functional-test/run.yaml index 8e4da26..7fc2cdf 100644 --- a/playbooks/functional-test/run.yaml +++ b/playbooks/functional-test/run.yaml @@ -24,6 +24,7 @@ - skopeo - buildah - podman + - findutils state: present become: true - name: Run setup tasks diff --git a/playbooks/functional-test/setup.yaml b/playbooks/functional-test/setup.yaml index 10e7925..2ea39cc 100644 --- a/playbooks/functional-test/setup.yaml +++ b/playbooks/functional-test/setup.yaml @@ -61,7 +61,7 @@ command: "cp /run/user/{{ ansible_user_uid }}/auth.json {{ workspace }}/containers-auth.json" - name: Create a local containers image - shell: buildah commit --rm $(buildah from scratch) testimage + shell: buildah commit --rm $(buildah from docker.io/zuul/zuul-registry) testimage - name: Ensure image file is not present file: