Skip to content

Commit cc46e7e

Browse files
committed
add primary_postgresql_host as an optional parameter in the migration plan. add it as a parameter, convert the string to a target, and add it as a step running the migration in the test_migration workflow .pp
1 parent 04674a5 commit cc46e7e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/acceptance/peadm_spec/plans/test_migration.pp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
String $primary_host,
33
String $new_primary_host,
44
Optional[String] $new_replica_host = undef,
5+
Optional[String] $primary_postgresql_host = undef,
56
Optional[String] $new_primary_postgresql_host = undef,
67
Optional[String] $new_replica_postgresql_host = undef,
78
Optional[String] $upgrade_version = undef,
@@ -10,6 +11,7 @@
1011
$primary_target = $primary_host ? { '' => undef, default => peadm::get_targets($primary_host, 1) }
1112
$new_primary_target = $new_primary_host ? { '' => undef, default => peadm::get_targets($new_primary_host, 1) }
1213
$new_replica_target = $new_replica_host ? { '' => undef, default => peadm::get_targets($new_replica_host, 1) }
14+
$primary_postgresql_target = $primary_postgresql_host ? { '' => undef, default => peadm::get_targets($primary_postgresql_host, 1) }
1315
$new_primary_postgresql_target = $new_primary_postgresql_host ? { '' => undef, default => peadm::get_targets($new_primary_postgresql_host, 1) }
1416
$new_replica_postgresql_target = $new_replica_postgresql_host ? { '' => undef, default => peadm::get_targets($new_replica_postgresql_host, 1) }
1517

@@ -30,7 +32,8 @@
3032
new_primary_host => $new_primary_target,
3133
upgrade_version => $upgrade_version,
3234
replica_host => $new_replica_target,
33-
primary_postgresql_host => $new_primary_postgresql_target,
35+
primary_postgresql_host => $primary_postgresql_target,
36+
new_primary_postgresql_host => $new_primary_postgresql_target,
3437
)
3538

3639
# run infra status on the new primary

0 commit comments

Comments
 (0)