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

Clean up SystemD tests #9213

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

mhashizume
Copy link
Contributor

This PR:

  • Updates array in SystemD tests to use consistent styles and use string-array and symbol-array literals for brevity.
  • Mocks the os.family fact in the SystemD nonexistent services tests to allow the test to run the Debian-specific code path, regardless of which platform the test is run on.

This commit:

- Removes internal spacing from array brackets.
- Shortens long arrays using ranges and string-array and symbol-array
  literals.
In e660355, we added an additional test for nonexistent services,
including a test for a Debian-specific code path that runs invoke-rc.d.

Because this code path is only invoked on Debian systems, this test
would regularly fail for any other platforms.

This commit mocks the os.family fact for the nonexistent services tests.
@mhashizume mhashizume added the maintenance Maintenance chores are excluded from changelogs label Jan 20, 2024
@mhashizume mhashizume requested a review from a team as a code owner January 20, 2024 00:00
Copy link
Collaborator

@cthorn42 cthorn42 left a comment

Choose a reason for hiding this comment

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

Looks good, the systemd_spec.rb file is passing for me locally now when running specs.

@cthorn42 cthorn42 merged commit 67326dc into puppetlabs:main Jan 22, 2024
10 checks passed
@mhashizume mhashizume deleted the PUP-11656/main/macos-systemd branch January 22, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance chores are excluded from changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants