Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle output from call_cmd better in maas_storage #283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

plars
Copy link
Collaborator

@plars plars commented Jun 4, 2024

Description

I was looking at some other things with the maas device connector and recalled that there were some gaps in how output is handled from this call_cmd method in maas_storage. There are some failure modes that wouldn't produce the output you would expect, and some places where it should raise an exception instead. This should close those gaps.

I also noticed while testing this that the previous unit tests fail on python3.12 because there's a way it can get TypeError when trying to run the command with None in it. This handles that potential error better, and also adds a way to inject the node_info so that testing is easier

Resolved issues

Resolves #264

Documentation

N/A

Web service API changes

N/A

Tests

Lots of test improvements, including a way to inject node_info in MaasStorage.
+4% coverage of maas_storage with the additional unit tests added too

@plars plars requested review from a team, val500, bladernr and rodwsmith June 4, 2024 18:42
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.

JSONDecodeError when provisioning with maas storage specified
1 participant