You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to write tests for my charm using the operator framework but the charmcraft pack step fails as it neither uses a remote lxd cluster nor does it try to use multipass as charmcraft already uses if I try to build the charm locally directly outside tests.
File "/Users/jatin/canonical/nats-operator/tests/integration/test_charm.py", line 8, in test_smoke
charm = await ops_test.build_charm(".")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jatin/canonical/nats-operator/.tox/integration/lib/python3.11/site-packages/pytest_operator/plugin.py", line 969, in build_charm
assert "lxd" in all_groups, (
AssertionError: Group 'lxd' required but not available; ensure that lxd is available or use --destructive-mode
assert 'lxd' in {'_accessoryupdater', '_amavisd', '_analyticsd', '_analyticsusers', '_appinstalld', '_appleevents', ...}
Using --destructive-mode also fails as it does not find lxd on the host:
File "/Users/jatin/canonical/nats-operator/tests/integration/test_charm.py", line 8, in test_smoke
charm = await ops_test.build_charm(".")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jatin/canonical/nats-operator/.tox/integration/lib/python3.11/site-packages/pytest_operator/plugin.py", line 1004, in build_charm
raise RuntimeError(
RuntimeError: Failed to build charm .:
Packing the charm.
Skipping 'bases[0].build-on[0]': name 'ubuntu' does not match host 'darwin'.
No suitable 'build-on' environment found in 'bases[0]' configuration.
Skipping 'bases[1].build-on[0]': name 'ubuntu' does not match host 'darwin'.
No suitable 'build-on' environment found in 'bases[1]' configuration.
No suitable 'build-on' environment found in any 'bases' configuration.
I am trying to write tests for my charm using the operator framework but the
charmcraft pack
step fails as it neither uses a remote lxd cluster nor does it try to use multipass as charmcraft already uses if I try to build the charm locally directly outside tests.My charmcraft.yaml:
The error I get is :
Using
--destructive-mode
also fails as it does not find lxd on the host:https://github.com/charmed-kubernetes/pytest-operator/blob/117350c3cee10dafdf42471b0d383392946bde14/pytest_operator/plugin.py#L966C31-L966C43
The text was updated successfully, but these errors were encountered: