Skip to content

Conversation

@Yanovon
Copy link

@Yanovon Yanovon commented Oct 23, 2025

Added exist_ok=True to os.makedirs() in TestSet.setUp() to prevent errors if the directory already exists. Improves test reliability and idempotence.

Description

This change ensures that directory creation in TestSet.setUp() is idempotent by adding exist_ok=True to os.makedirs().
Previously, the test could fail if the etc/netplan directory already existed.
This update improves test robustness and repeatability.

Checklist

  • Runs make check successfully.
  • Retains code coverage (make check-coverage).
  • New/changed keys in YAML format are documented. (not applicable)
  • (Optional) Adds example YAML for new feature. (not applicable)
  • (Optional) Closes an open bug in Launchpad. (not applicable)

Added exist_ok=True to os.makedirs() in TestSet.setUp() to prevent errors if the directory already exists. Improves test reliability and idempotence.
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.

1 participant