Skip to content

Update unit specs to match refactored integrations interface#5

Merged
alvagante merged 2 commits intotestfrom
copilot/sub-pr-1-yet-again
Feb 23, 2026
Merged

Update unit specs to match refactored integrations interface#5
alvagante merged 2 commits intotestfrom
copilot/sub-pr-1-yet-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

The pabawi class was refactored to replace bolt_enable/puppetdb_enable boolean params and a hash-typed integrations parameter with a single Array[String[1]] $integrations, but the unit spec and Hiera fixture data still referenced the old interface, causing test failures.

Changes

  • spec/classes/init_spec.rb: Replaced all contexts using bolt_enable, puppetdb_enable, and integrations hash with equivalent contexts using the new array form:

    # Before
    { bolt_enable: true }
    { integrations: { 'terraform' => true, 'ansible' => false } }
    
    # After
    { integrations: ['bolt'] }
    { integrations: ['terraform'] }

    Updated the invalid-type test to assert an Array[String type error instead of a Boolean one.

  • spec/fixtures/data/common.yaml: Removed pabawi::bolt_enable and pabawi::puppetdb_enable entries; changed pabawi::integrations: {} to pabawi::integrations: [].


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: alvagante <283804+alvagante@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback from review on 'Test' pull request Update unit specs to match refactored integrations interface Feb 23, 2026
Copilot AI requested a review from alvagante February 23, 2026 07:45
@alvagante alvagante marked this pull request as ready for review February 23, 2026 07:56
Copilot AI review requested due to automatic review settings February 23, 2026 07:56
@alvagante alvagante merged commit 68b1ec5 into test Feb 23, 2026
1 check passed
@alvagante alvagante deleted the copilot/sub-pr-1-yet-again branch February 23, 2026 07:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Aligns the module’s RSpec unit tests and Hiera fixture data with the refactored pabawi integrations interface (Array[String[1]] $integrations) to fix failing specs caused by the removed boolean flags and hash-based integrations config.

Changes:

  • Updated spec/classes/init_spec.rb to exercise integrations via integrations => ['name'] and adjusted the invalid-type expectation accordingly.
  • Updated spec/fixtures/data/common.yaml to remove pabawi::bolt_enable / pabawi::puppetdb_enable and switch pabawi::integrations from {} to [].

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
spec/classes/init_spec.rb Refactors spec contexts to use the new integrations array interface and updates the type-validation assertion.
spec/fixtures/data/common.yaml Updates fixture Hiera data to the new interface by removing old flags and setting integrations to an empty array.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 13 to 16
# Integration flags
pabawi::bolt_enable: false
pabawi::puppetdb_enable: false
pabawi::integrations: {}
pabawi::integrations: []

# Bolt integration configuration (required if bolt_enable is true)
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The comments in this fixture still refer to the removed bolt_enable/puppetdb_enable flags (and call this section “Integration flags”). Since the interface is now pabawi::integrations: ['bolt', ...], please update these comments to reference enabling integrations via the integrations array to avoid misleading fixture documentation.

Copilot uses AI. Check for mistakes.
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.

3 participants