Improved Primitive support and better testing
This changeset addresses several issues.
- Improve primitive support so the status and output of an executed
primitive can be retrieved
- Merge latest upstream libjuju (required for new primive features)
- New testing framework
This is the start of a new testing framework with the ability to
create and configure LXD containers with SSH, to use while testing proxy
charms.
- Add support for using ssh keys with proxy charms
See Feature 1429. This uses the per-proxy charm/unit ssh keypair
Signed-off-by: Adam Israel <adam.israel@canonical.com>
diff --git a/modules/libjuju/tests/integration/test_machine.py b/modules/libjuju/tests/integration/test_machine.py
index 8957ae1..9a5f075 100644
--- a/modules/libjuju/tests/integration/test_machine.py
+++ b/modules/libjuju/tests/integration/test_machine.py
@@ -26,18 +26,15 @@
assert machine.agent_status == 'pending'
assert not machine.agent_version
+ # there is some inconsistency in the capitalization of status_message
+ # between different providers
await asyncio.wait_for(
- model.block_until(lambda: (machine.status == 'running' and
- machine.agent_status == 'started' and
- machine.agent_version is not None)),
+ model.block_until(
+ lambda: (machine.status == 'running' and
+ machine.status_message.lower() == 'running' and
+ machine.agent_status == 'started')),
timeout=480)
- assert machine.status == 'running'
- # there is some inconsistency in the message case between providers
- assert machine.status_message.lower() == 'running'
- assert machine.agent_status == 'started'
- assert machine.agent_version.major >= 2
-
@base.bootstrapped
@pytest.mark.asyncio