From 3a8be57779ca26fb203a2ae618d356616a9e1ab5 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 14 Dec 2021 13:33:27 +0100 Subject: [PATCH] cephadm: count number of docker.io occurrences. We have to be super careful adding any new hardcoded regstistry names to the code base. Let's make this an informed decision next time. Signed-off-by: Sebastian Wagner (cherry picked from commit 0fe2e54db774271e4fc18b45aba36b66cbc71779) --- src/cephadm/tox.ini | 2 ++ src/pybind/mgr/tox.ini | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/cephadm/tox.ini b/src/cephadm/tox.ini index 6f25b4008f0fc..1ee4f53b7f966 100644 --- a/src/cephadm/tox.ini +++ b/src/cephadm/tox.ini @@ -54,8 +54,10 @@ commands = [testenv:flake8] basepython = python3 +allowlist_externals = bash deps = flake8 flake8-quotes commands = flake8 --config=tox.ini {posargs:cephadm} + bash -c "test $(grep 'docker.io' cephadm | wc -l) == 11" diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index c83d435f14f9b..0eaac7bd1ac74 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -123,6 +123,7 @@ commands = basepython = python3 deps = flake8 +allowlist_externals = bash modules = cephadm cli_api @@ -132,6 +133,7 @@ modules = commands = flake8 --config=tox.ini {posargs} \ {posargs:{[testenv:flake8]modules}} + bash -c 'test $(git ls-files cephadm | grep ".py$" | grep -v tests | xargs grep "docker.io" | wc -l) == 13' [testenv:jinjalint] basepython = python3 -- 2.39.5