@pytest.mark.abort_on_fail
async def test_build_and_deploy(ops_test):
    my_charm = (await ops_test.build_charm('.'))
    image_path = METADATA['resources']['oci-image']['upstream-source']
    (await ops_test.model.deploy(my_charm, resources={'oci-image': image_path}))
    charm_name = METADATA['name']
    (await ops_test.model.wait_for_idle([charm_name], raise_on_blocked=True, raise_on_error=True, timeout=300))
    assert (ops_test.model.applications[charm_name].units[0].workload_status == 'waiting')
    assert (ops_test.model.applications[charm_name].units[0].workload_status_message == 'Waiting for kubeflow-profiles relation data')
@pytest.mark.abort_on_fail
async def test_build_and_deploy(ops_test):
    my_charm = (await ops_test.build_charm('.'))
    image_path = METADATA['resources']['oci-image']['upstream-source']
    (await ops_test.model.deploy(my_charm, resources={'oci-image': image_path}))
    charm_name = METADATA['name']
    (await ops_test.model.wait_for_idle([charm_name], raise_on_blocked=True, raise_on_error=True, timeout=300))
    assert (ops_test.model.applications[charm_name].units[0].workload_status == 'waiting')
    assert (ops_test.model.applications[charm_name].units[0].workload_status_message == 'Waiting for kubeflow-profiles relation data')