Skip to content

Commit cf35c08

Browse files
Fix spread on GH runners & fix upgrade test (#266)
Fix failing release CI
1 parent 2c1e8e6 commit cf35c08

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

spread.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ backends:
7979
PermitEmptyPasswords yes
8080
EOF
8181
82+
sudo passwd --delete "$USER"
83+
8284
ADDRESS localhost
8385
# HACK: spread does not pass environment variables set on runner
8486
# Manually pass specific environment variables

tests/integration/test_upgrade.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ def create_valid_upgrade_charm(charm_file: typing.Union[str, pathlib.Path]) -> N
215215
216216
Upgrades require a new snap revision to avoid no-oping.
217217
"""
218-
with pathlib.Path("refresh_versions.toml").open("rb") as file:
219-
versions = tomli.load(file)
218+
with zipfile.ZipFile(charm_file, mode="r") as charm_zip:
219+
with zipfile.Path(charm_zip, "refresh_versions.toml").open("rb") as file:
220+
versions = tomli.load(file)
220221

221222
# charm needs to refresh snap to be able to avoid no-op when upgrading.
222223
# set an old revision of the snap
@@ -230,8 +231,9 @@ def create_valid_upgrade_charm(charm_file: typing.Union[str, pathlib.Path]) -> N
230231

231232
def create_invalid_upgrade_charm(charm_file: typing.Union[str, pathlib.Path]) -> None:
232233
"""Create an invalid mysql router charm for upgrade."""
233-
with pathlib.Path("refresh_versions.toml").open("rb") as file:
234-
versions = tomli.load(file)
234+
with zipfile.ZipFile(charm_file, mode="r") as charm_zip:
235+
with zipfile.Path(charm_zip, "refresh_versions.toml").open("rb") as file:
236+
versions = tomli.load(file)
235237

236238
versions["charm"] = "8.0/0.0.0"
237239

0 commit comments

Comments
 (0)