use of io.stackgres.common.fixture.StackGresDistributedLogsSpecFixture in project stackgres by ongres.
the class StackGresDistributedLogsUtilTest method shouldBuildSgDistributedLogsPostgresServices_withOnlyReplicas.
@Test
void shouldBuildSgDistributedLogsPostgresServices_withOnlyReplicas() {
StackGresDistributedLogsSpec spec = new StackGresDistributedLogsSpecFixture().withReplicasPostgresServices(replicas).build();
StackGresClusterPostgresServices postgresServices = StackGresDistributedLogsUtil.buildPostgresServices(spec);
assertNull(postgresServices.getPrimary());
assertNotNull(postgresServices.getReplicas());
assertTrue(replicas.equals(postgresServices.getReplicas()));
}
use of io.stackgres.common.fixture.StackGresDistributedLogsSpecFixture in project stackgres by ongres.
the class StackGresDistributedLogsUtilTest method shouldBuildSgDistributedLogsPostgresServices_withOnlyPrimary.
@Test
void shouldBuildSgDistributedLogsPostgresServices_withOnlyPrimary() {
StackGresDistributedLogsSpec spec = new StackGresDistributedLogsSpecFixture().withPrimaryPostgresServices(primary).build();
StackGresClusterPostgresServices postgresServices = StackGresDistributedLogsUtil.buildPostgresServices(spec);
assertNotNull(postgresServices.getPrimary());
assertNull(postgresServices.getReplicas());
assertTrue(primary.equals(postgresServices.getPrimary()));
}
Aggregations