-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PE-39228 add_replica smoke test (#497)
* PE-39228 Smoke test created and added to workflow * PE-39228 Workflow updated * PE-39228 Spec updated, smoke test added to matrix * PE-39228 Versions updated, push trigger removed from matrix * PE-39228 whitespace fixed
- Loading branch information
1 parent
8802e03
commit 47d45a1
Showing
3 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
plan peadm_spec::verify_replica() { | ||
$t = get_targets('*') | ||
wait_until_available($t) | ||
|
||
$primary_host = $t.filter |$n| { $n.vars['role'] == 'primary' } | ||
|
||
if $primary_host == [] { | ||
fail_plan('"primary" role missing from inventory, cannot continue') | ||
} | ||
|
||
$result = run_task('peadm::get_peadm_config', $primary_host, '_catch_errors' => true).first.to_data() | ||
|
||
$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") | ||
} else { | ||
out::message("Replica added successfully: ${replica_host}") | ||
} | ||
} |