Skip to content

Commit

Permalink
PE-39228 Spec updated, smoke test added to matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronShannon committed Sep 9, 2024
1 parent e11932e commit b5150b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test-add-replica-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
- .fixtures.yml
branches: [main]
workflow_dispatch: {}
push:
jobs:
test-add-replica:
name: PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }}
Expand Down Expand Up @@ -92,6 +93,12 @@ jobs:
--inventoryfile spec/fixtures/litmus_inventory.yaml \
--modulepath spec/fixtures/modules \
--stream
- name: Verify that replica was added
timeout-minutes: 10
run: |
bundle exec bolt plan run peadm_spec::verify_replica -v \
--inventoryfile spec/fixtures/litmus_inventory.yaml \
--modulepath spec/fixtures/modules
- name: Tear down test cluster
if: ${{ always() }}
continue-on-error: true
Expand Down
4 changes: 2 additions & 2 deletions spec/acceptance/peadm_spec/plans/verify_replica.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
fail_plan('"primary" role missing from inventory, cannot continue')
}

$result = run_task('peadm::get_peadm_config', $primary_host, '_catch_errors' => true)
$result = run_task('peadm::get_peadm_config', $primary_host, '_catch_errors' => true).first.to_data()

$replica_host = $result.first['result']['params']['replica_host']
$replica_host = $result['value']['params']['replica_host']

if $replica_host == undef or $replica_host == null {
fail_plan("No replica was found in the PE configuration")
Expand Down

0 comments on commit b5150b4

Please sign in to comment.