Skip to content

Conversation

@mattculler
Copy link
Contributor

@mattculler mattculler commented Jan 15, 2025

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run tox?

Make use of craft_providers's new intercept_mknod argument to LXDProvider.

canonical/craft-providers#717

@mattculler mattculler marked this pull request as ready for review January 16, 2025 15:45
@mattculler mattculler self-assigned this Jan 16, 2025
@upils upils requested review from mr-cal and upils January 16, 2025 16:10
@mattculler
Copy link
Contributor Author

Failing integration tests will be fixed by #587

pyproject.toml Outdated
Comment on lines 12 to 13
"craft-providers @ git+https://github.com/canonical/craft-providers.git@work/CRAFT-2568-settable-mknod-intercept",
#"craft-providers>=2.1.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to future self: update this once I release a new craft-providers.

Copy link
Contributor

@mr-cal mr-cal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see unit tests for the logic, otherwise looks good. Thanks for filling out the docstrings.

with check:
mock_provider.assert_called_once_with(
lxd_project="testcraft", lxd_remote=lxd_remote
lxd_project="testcraft", lxd_remote=lxd_remote, intercept_mknod=True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you exercise the default value and setting ProviderService(intercept_mknod)?

A quick way to do this would be to instantiate a ProviderService like some of the other tests and add something along the lines of @pytest.param("intercept_mknod", [None, True, False])

@mattculler mattculler force-pushed the work/CRAFT-2568-settable-mknod-intercept branch from 456fb52 to 9f8c5b4 Compare January 24, 2025 15:25
@mattculler mattculler force-pushed the work/CRAFT-2568-settable-mknod-intercept branch from 9f8c5b4 to 8461153 Compare February 4, 2025 20:45
@mattculler mattculler removed their assignment May 9, 2025
Signed-off-by: Alex Lowe <alex.lowe@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants