still_more = True
docker_tag_url = _docker_base + "/" + repo_name + "/tags"
while still_more:
+ raw_json = None
retries = 0
while retries < 20:
try:
tag_name = result["name"]
self.add_tag(tag_name)
log.debug("Docker {} has tag {}".format(combined_repo_name, tag_name))
+
+ if raw_json["next"]:
+ docker_tag_url = raw_json["next"]
+ still_more = True
+ else:
+ still_more = False
except Exception:
log.debug("Issue fetching tags for {}".format(combined_repo_name))
else:
self.repository_exist = False
- if raw_json["next"]:
- docker_tag_url = raw_json["next"]
- still_more = True
- else:
- still_more = False
+ return
class ProjectClass:
--- /dev/null
+---
+fixes:
+ - |
+ Initialize raw_json variable before first usage otherwise we will get
+ UnboundLocalError. Additionally move some logic using the raw_json to
+ a position where it makes more sense.
+ Pytest configuration was outdated so it was required to upgrade plugin
+ versions and tests code in order to get a healthy Gerrit change.
"""Test copy_archives() command to ensure archives dir is copied."""
os.chdir(str(datafiles))
workspace_dir = os.path.join(str(datafiles), "workspace")
- stage_dir = str(datafiles.mkdir("stage_archive"))
+ stage_dir = os.path.join(str(datafiles), "stage_archive")
+ os.mkdir(stage_dir)
os.chdir(stage_dir)
result = cli_runner.invoke(cli.cli, ["--debug", "deploy", "copy-archives", workspace_dir], obj={})
"""Test copy_archives() command to ensure glob patterns are copied."""
os.chdir(str(datafiles))
workspace_dir = os.path.join(str(datafiles), "workspace")
- stage_dir = str(datafiles.mkdir("stage_archive"))
+ stage_dir = os.path.join(str(datafiles), "stage_archive")
+ os.mkdir(stage_dir)
os.chdir(stage_dir)
result = cli_runner.invoke(cli.cli, ["--debug", "deploy", "copy-archives", workspace_dir, "**/*.txt"], obj={})
os.chdir(str(datafiles))
cli_runner.invoke(cli.cli, ["version", "bump", "TestRelease"], obj={})
- for _file in datafiles.listdir():
+ for _file in datafiles.iterdir():
pom = str(_file) + "/pom.xml"
expected_pom = str(_file) + "/pom.xml.expected"
# noqa: B101 .
os.chdir(str(datafiles))
cli_runner.invoke(cli.cli, ["version", "release", "TestRelease"], obj={})
- for _file in datafiles.listdir():
+ for _file in datafiles.iterdir():
pom = str(_file) + "/pom.xml"
expected_pom = str(_file) + "/pom.xml.expected"
# noqa: B101 .
basepython = python3
# This needs to mirror the test section of pyproject.toml
deps =
- pytest==5.3.5
- pytest-click==0.3
- pytest-cov
- pytest-datafiles==2.0
- pytest-mock==2.0.0
- pytest-responses==0.4.0
+ pytest==8.3.5
+ pytest-click==1.1.0
+ pytest-cov==5.0.0
+ pytest-datafiles==3.0.0
+ pytest-mock==3.14.0
+ pytest-responses==0.5.1
commands = pytest
usedevelop = true