Skip to content

Commit b7afd29

Browse files
Use juju_.has_secrets to be correctly handle action result return code in data integrator test
1 parent 3657e83 commit b7afd29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/integration/test_data_integrator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ async def get_data_integrator_credentials(ops_test: OpsTest) -> typing.Dict:
3434
data_integrator_unit = ops_test.model.applications[DATA_INTEGRATOR_APP_NAME].units[0]
3535
action = await data_integrator_unit.run_action(action_name="get-credentials")
3636
result = await action.wait()
37-
assert result.results["return-code"] == 0
37+
if juju_.has_secrets:
38+
assert result.results["Code"] == 0
39+
else:
40+
assert result.results["return-code"] == 0
3841
assert result.results["ok"] == "True"
3942
return result.results["mysql"]
4043

0 commit comments

Comments
 (0)