1
0
mirror of synced 2026-01-08 12:03:02 -05:00

Add ability to provide source/destination connector docker image (#14266)

* Add ability to provide source/destination connector docker image

* Make constant public
This commit is contained in:
Jonathan Pearlin
2022-06-29 14:13:10 -04:00
committed by GitHub
parent 1db8e99072
commit f4e2b8e949

View File

@@ -108,6 +108,8 @@ public class AirbyteAcceptanceTestHarness {
// assume env file is one directory level up from airbyte-tests.
private final static File ENV_FILE = Path.of(System.getProperty("user.dir")).getParent().resolve(".env").toFile();
public static final String DEFAULT_POSTGRES_DOCKER_IMAGE_NAME = "postgres:13-alpine";
private static final String SOURCE_E2E_TEST_CONNECTOR_VERSION = "0.1.1";
private static final String DESTINATION_E2E_TEST_CONNECTOR_VERSION = "0.1.1";
@@ -162,9 +164,17 @@ public class AirbyteAcceptanceTestHarness {
this.apiClient = apiClient;
}
@SuppressWarnings("UnstableApiUsage")
public AirbyteAcceptanceTestHarness(final AirbyteApiClient apiClient, final UUID defaultWorkspaceId)
throws URISyntaxException, IOException, InterruptedException, ApiException {
throws URISyntaxException, IOException, InterruptedException {
this(apiClient, defaultWorkspaceId, DEFAULT_POSTGRES_DOCKER_IMAGE_NAME, DEFAULT_POSTGRES_DOCKER_IMAGE_NAME);
}
@SuppressWarnings("UnstableApiUsage")
public AirbyteAcceptanceTestHarness(final AirbyteApiClient apiClient,
final UUID defaultWorkspaceId,
final String sourceDatabaseDockerImageName,
final String destinationDatabaseDockerImageName)
throws URISyntaxException, IOException, InterruptedException {
// reads env vars to assign static variables
assignEnvVars();
this.apiClient = apiClient;
@@ -174,12 +184,12 @@ public class AirbyteAcceptanceTestHarness {
throw new RuntimeException("KUBE Flag should also be enabled if GKE flag is enabled");
}
if (!isGke) {
sourcePsql = new PostgreSQLContainer("postgres:13-alpine")
sourcePsql = new PostgreSQLContainer(sourceDatabaseDockerImageName)
.withUsername(SOURCE_USERNAME)
.withPassword(SOURCE_PASSWORD);
sourcePsql.start();
destinationPsql = new PostgreSQLContainer("postgres:13-alpine");
destinationPsql = new PostgreSQLContainer(destinationDatabaseDockerImageName);
destinationPsql.start();
}