]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: count number of docker.io occurrences. 44632/head
authorSebastian Wagner <sewagner@redhat.com>
Tue, 14 Dec 2021 12:33:27 +0000 (13:33 +0100)
committerAdam King <adking@redhat.com>
Mon, 21 Feb 2022 18:43:45 +0000 (13:43 -0500)
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>
(cherry picked from commit 0fe2e54db774271e4fc18b45aba36b66cbc71779)

src/cephadm/tox.ini
src/pybind/mgr/tox.ini

index 6f25b4008f0fc3309ebacf22093a01204f27175c..1ee4f53b7f96680ff99cb544acf907ffaf76baba 100644 (file)
@@ -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"
index c83d435f14f9b90cebe209f2ab421dabf1aaf857..0eaac7bd1ac74f80effe912a23c4179640d852f4 100644 (file)
@@ -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