]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: count number of docker.io occurrences. 44306/head
authorSebastian Wagner <sewagner@redhat.com>
Tue, 14 Dec 2021 12:33:27 +0000 (13:33 +0100)
committerSebastian Wagner <sewagner@redhat.com>
Wed, 15 Dec 2021 10:21:17 +0000 (11:21 +0100)
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 <sewagner@redhat.com>
src/cephadm/tox.ini
src/pybind/mgr/tox.ini

index c4c45365a90770e4eca780fd26e3a37e7a4c4fc9..730076914f3aed1bae88244aafe5aee02828d587 100644 (file)
@@ -56,8 +56,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) == 10"
index 44a606076286410776fc8ea823598fd796b6a8d6..20b37d97d65ff814016e4a154f44f1a64a04b004 100644 (file)
@@ -144,6 +144,7 @@ commands =
 basepython = python3
 deps =
     flake8
+allowlist_externals = bash
 modules =
     alerts
     balancer
@@ -161,6 +162,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) == 12'
 
 [testenv:jinjalint]
 basepython = python3