Skip to content

Commit

Permalink
Add more assertions around connection check
Browse files Browse the repository at this point in the history
Signed-off-by: Tanner Lewis <[email protected]>
  • Loading branch information
lewijacn committed Oct 23, 2024
1 parent 1e01deb commit a958791
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ def initialize(request):
if 'AWS_EXECUTION_ENV' in os.environ:
logger.info("Detected an AWS environment")
stage = request.config.getoption("--stage")
source_cluster.endpoint = f"https://alb.migration.{stage}.local:9200"
logger.info("Checking original source and target endpoints can be reached, before using ALB endpoints for test")
direct_source_con_result: ConnectionResult = connection_check(source_cluster)
assert direct_source_con_result.connection_established is True
direct_target_con_result: ConnectionResult = connection_check(target_cluster)
assert direct_target_con_result.connection_established is True
source_cluster.endpoint = f"https://alb.migration.{stage}.local:9201"
target_cluster.endpoint = f"https://alb.migration.{stage}.local:9202"
target_cluster.allow_insecure = True
backfill: Backfill = pytest.console_env.backfill
assert backfill is not None
metadata: Metadata = pytest.console_env.metadata
Expand Down

0 comments on commit a958791

Please sign in to comment.