Skip to content

Commit

Permalink
chore: fix katib-controller integration test (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
orfeas-k authored Jun 12, 2024
1 parent c1a553e commit 261f5e0
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions charms/katib-controller/tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,8 @@ async def test_build_and_deploy(self, ops_test: OpsTest):
Assert on the unit status.
"""
# Deploy dependencies katib-db-manager and katib-db which is a dependency of the latter.
# Building the charm as a temporary workaround since this PR introduces a new relation.
# Once this PR is merged, a follow-up PR will remove the following code
# and uncomment the line below.
db_manager_path = Path("../katib-db-manager")
db_manager_metadata = yaml.safe_load(Path(f"{db_manager_path}/metadata.yaml").read_text())
db_manager_image_path = db_manager_metadata["resources"]["oci-image"]["upstream-source"]
db_manager_charm = await ops_test.build_charm(db_manager_path)
await ops_test.model.deploy(
db_manager_charm, resources={"oci-image": db_manager_image_path}, trust=True
)
# await ops_test.model.deploy(
# KATIB_DB_MANAGER, channel=KATIB_DB_MANAGER_CHANNEL, trust=True
# )
# Deploy dependency katib-db-manager
await ops_test.model.deploy(KATIB_DB_MANAGER, channel=KATIB_DB_MANAGER_CHANNEL, trust=True)

charm_under_test = await ops_test.build_charm(".")
image_path = METADATA["resources"]["oci-image"]["upstream-source"]
Expand Down

0 comments on commit 261f5e0

Please sign in to comment.