diff --git a/tests/bundle/bundle.yaml b/tests/bundle/bundle.yaml index 34ce0747..b3783aa6 100644 --- a/tests/bundle/bundle.yaml +++ b/tests/bundle/bundle.yaml @@ -1,12 +1,9 @@ series: jammy applications: - grafana: - charm: "grafana" - channel: stable - num_units: 1 - prometheus: - charm: "prometheus2" - channel: stable + juju-qa-test: + charm: "juju-qa-test" num_units: 1 + nrpe: + charm: "nrpe" relations: - - ["prometheus:grafana-source", "grafana:grafana-source"] \ No newline at end of file + - ["nrpe:general-info", "juju-qa-test:juju-info"] \ No newline at end of file diff --git a/tests/bundle/mini-bundle.yaml b/tests/bundle/mini-bundle.yaml index 3ee4e585..f8d62fe9 100644 --- a/tests/bundle/mini-bundle.yaml +++ b/tests/bundle/mini-bundle.yaml @@ -1,12 +1,10 @@ series: jammy applications: - grafana: - charm: "grafana" - channel: stable + juju-qa-test: + charm: "juju-qa-test" num_units: 1 - prometheus: - charm: "prometheus2" - channel: stable + nrpe: + charm: "nrpe" num_units: 1 relations: - - ["prometheus:grafana-source", "grafana:grafana-source"] + - ["nrpe:general-info", "juju-qa-test:juju-info"] diff --git a/tests/integration/test_model.py b/tests/integration/test_model.py index a6e662a9..e52a1b1f 100644 --- a/tests/integration/test_model.py +++ b/tests/integration/test_model.py @@ -43,16 +43,15 @@ async def test_deploy_local_bundle_dir(event_loop): async with base.CleanModel() as model: await model.deploy(str(bundle_path)) - app1 = model.applications.get('grafana') - app2 = model.applications.get('prometheus') + app1 = model.applications.get('juju-qa-test') + app2 = model.applications.get('nrpe') with open("/tmp/output", "w") as writer: writer.write(str(bundle_path) + "\n") for (k, v) in model.applications.items(): writer.write(k) assert app1 and app2 - await model.block_until(lambda: (len(app1.units) == 1 and - len(app2.units) == 1), - timeout=60 * 4) + # import pdb;pdb.set_trace() + await model.wait_for_idle(['juju-qa-test', 'nrpe'], wait_for_at_least_units=1) @base.bootstrapped @@ -64,12 +63,10 @@ async def test_deploy_local_bundle_file(event_loop): async with base.CleanModel() as model: await model.deploy(str(mini_bundle_file_path)) - app1 = model.applications.get('grafana') - app2 = model.applications.get('prometheus') + app1 = model.applications.get('juju-qa-test') + app2 = model.applications.get('nrpe') assert app1 and app2 - await model.block_until(lambda: (len(app1.units) == 1 and - len(app2.units) == 1), - timeout=60 * 4) + await model.wait_for_idle(['juju-qa-test', 'nrpe'], wait_for_at_least_units=1) @base.bootstrapped