Skip to content

Commit

Permalink
Fix Active/Passive functional tests (#846)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Emerson <remerson@redhat.com>
  • Loading branch information
ryanemerson committed Jun 12, 2024
1 parent f30cebc commit 8d5df10
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rosa-run-crossdc-func-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ jobs:
run: ./provision/rosa-cross-dc/keycloak-benchmark-crossdc-tests/run-crossdc-tests.sh
env:
ACTIVE_ACTIVE: ${{ inputs.activeActive }}
DEPLOYMENT_NAMESPACE: ${{ env.PROJECT }}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public abstract class AbstractCrossDCTest {

public AbstractCrossDCTest() {
var httpClient = HttpClientUtils.newHttpClient();
this.activePassive = !System.getProperty("deployment.type", "").equals(ActivePassive.TAG);
this.activePassive = System.getProperty("deployment.type", ActivePassive.TAG).equals(ActivePassive.TAG);
this.DC_1 = new DatacenterInfo(httpClient, 1, activePassive);
this.DC_2 = new DatacenterInfo(httpClient, 2, activePassive);
this.LOAD_BALANCER_KEYCLOAK = new KeycloakClient(httpClient, DC_1.getLoadbalancerURL(), activePassive);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class FailoverTest extends AbstractCrossDCTest {

@Override
protected void failbackLoadBalancers() throws URISyntaxException, IOException, InterruptedException {
super.failbackLoadBalancers();
if (activePassive) {
String domain = DC_1.getKeycloakServerURL().substring("https://".length());
AWSClient.updateRoute53HealthCheckPath(domain, "/lb-check");
Expand All @@ -38,7 +39,6 @@ protected void failbackLoadBalancers() throws URISyntaxException, IOException, I
// Assert that both sites are part of the Accelerator EndpointGroup
waitForAcceleratorEndpointCount(2);
}
super.failbackLoadBalancers();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public DatacenterInfo(HttpClient httpClient, int index, boolean activePassive) {
this.keycloakServerURL = "https://" + oc.routes()
.inNamespace(namespace)
.withName("aws-health-route")
.item()
.get()
.getSpec()
.getHost();
} else {
Expand Down

0 comments on commit 8d5df10

Please sign in to comment.