Skip to content

Commit

Permalink
Automated Commit - Formatting Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-airbyte committed Dec 3, 2023
1 parent dd78b56 commit e291199
Show file tree
Hide file tree
Showing 26 changed files with 70 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import io.airbyte.cdk.integrations.standardtest.source.TestDestinationEnv;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import java.util.Map;

public abstract class AbstractCdcPostgresSourceSslAcceptanceTest extends CdcPostgresSourceAcceptanceTest {
Expand All @@ -34,7 +34,7 @@ protected JsonNode getConfig() {
.build();
}

protected abstract PostgresBaseImage getServerImage();
protected abstract BaseImage getServerImage();

public abstract Map<Object, Object> getCertificateConfiguration();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import io.airbyte.commons.features.FeatureFlagsWrapper;
import io.airbyte.commons.json.Jsons;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.Field;
import io.airbyte.protocol.models.JsonSchemaType;
import io.airbyte.protocol.models.v0.CatalogHelpers;
Expand Down Expand Up @@ -40,7 +40,7 @@ protected FeatureFlags featureFlags() {

@Override
protected void setupEnvironment(final TestDestinationEnv environment) throws Exception {
testdb = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_16_BULLSEYE, "withCert")
testdb = PostgresTestDatabase.in(BaseImage.POSTGRES_16_BULLSEYE, "withCert")
.with("CREATE TABLE id_and_name(id INTEGER, name VARCHAR(200));")
.with("INSERT INTO id_and_name (id, name) VALUES (1,'picard'), (2, 'crusher'), (3, 'vash');")
.with("CREATE TABLE starships(id INTEGER, name VARCHAR(200));")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import io.airbyte.commons.functional.CheckedFunction;
import io.airbyte.commons.json.Jsons;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.Field;
import io.airbyte.protocol.models.JsonSchemaType;
import io.airbyte.protocol.models.v0.CatalogHelpers;
Expand Down Expand Up @@ -85,7 +85,7 @@ protected FeatureFlags featureFlags() {
// requiring data to already be in place.
@Override
protected void setupEnvironment(final TestDestinationEnv environment) throws Exception {
testdb = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_16_BULLSEYE, "withNetwork");
testdb = PostgresTestDatabase.in(BaseImage.POSTGRES_16_BULLSEYE, "withNetwork");
bastion.initAndStartBastion(testdb.getContainer().getNetwork());
populateDatabaseTestData();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

package io.airbyte.integrations.io.airbyte.integration_tests.sources;

import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;

public class CDCPostgresSourceCaCertificateSslAcceptanceLegacyCtidTest extends CDCPostgresSourceCaCertificateSslAcceptanceTest {

@Override
protected PostgresBaseImage getServerImage() {
return PostgresBaseImage.POSTGRES_12_BULLSEYE;
protected BaseImage getServerImage() {
return BaseImage.POSTGRES_12_BULLSEYE;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package io.airbyte.integrations.io.airbyte.integration_tests.sources;

import com.google.common.collect.ImmutableMap;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import java.util.Map;

public class CDCPostgresSourceCaCertificateSslAcceptanceTest extends AbstractCdcPostgresSourceSslAcceptanceTest {
Expand All @@ -19,8 +19,8 @@ public Map<Object, Object> getCertificateConfiguration() {
}

@Override
protected PostgresBaseImage getServerImage() {
return PostgresBaseImage.POSTGRES_16_BULLSEYE;
protected BaseImage getServerImage() {
return BaseImage.POSTGRES_16_BULLSEYE;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package io.airbyte.integrations.io.airbyte.integration_tests.sources;

import com.google.common.collect.ImmutableMap;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import java.util.Map;

public class CDCPostgresSourceFullCertificateSslAcceptanceTest extends AbstractCdcPostgresSourceSslAcceptanceTest {
Expand All @@ -23,8 +23,8 @@ public Map<Object, Object> getCertificateConfiguration() {
}

@Override
protected PostgresBaseImage getServerImage() {
return PostgresBaseImage.POSTGRES_16_BULLSEYE;
protected BaseImage getServerImage() {
return BaseImage.POSTGRES_16_BULLSEYE;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import io.airbyte.commons.features.FeatureFlags;
import io.airbyte.commons.features.FeatureFlagsWrapper;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.JsonSchemaType;

public class CdcInitialSnapshotPostgresSourceDatatypeTest extends AbstractPostgresSourceDatatypeTest {
Expand All @@ -24,7 +24,7 @@ protected FeatureFlags featureFlags() {

@Override
protected Database setupDatabase() throws Exception {
testdb = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_16_BULLSEYE, "withConf")
testdb = PostgresTestDatabase.in(BaseImage.POSTGRES_16_BULLSEYE, "withConf")
.with("CREATE EXTENSION hstore;")
.with("CREATE SCHEMA TEST;")
.with("CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

package io.airbyte.integrations.io.airbyte.integration_tests.sources;

import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;

public class CdcPostgresSourceAcceptanceLegacyCtidTest extends CdcPostgresSourceAcceptanceTest {

@Override
protected PostgresBaseImage getServerImage() {
return PostgresBaseImage.POSTGRES_12_BULLSEYE;
protected BaseImage getServerImage() {
return BaseImage.POSTGRES_12_BULLSEYE;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import io.airbyte.commons.features.FeatureFlagsWrapper;
import io.airbyte.commons.json.Jsons;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.Field;
import io.airbyte.protocol.models.JsonSchemaType;
import io.airbyte.protocol.models.v0.AirbyteMessage;
Expand Down Expand Up @@ -169,8 +169,8 @@ private void verifyFieldNotExist(final List<AirbyteRecordMessage> records, final
.isEmpty(), "Records contain unselected columns [%s:%s]".formatted(stream, field));
}

protected PostgresBaseImage getServerImage() {
return PostgresBaseImage.POSTGRES_16_BULLSEYE;
protected BaseImage getServerImage() {
return BaseImage.POSTGRES_16_BULLSEYE;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import io.airbyte.commons.features.FeatureFlagsWrapper;
import io.airbyte.commons.json.Jsons;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.JsonSchemaType;
import io.airbyte.protocol.models.v0.AirbyteMessage;
import io.airbyte.protocol.models.v0.AirbyteStateMessage;
Expand Down Expand Up @@ -72,7 +72,7 @@ protected FeatureFlags featureFlags() {

@Override
protected Database setupDatabase() {
testdb = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_16_BULLSEYE, "withConf")
testdb = PostgresTestDatabase.in(BaseImage.POSTGRES_16_BULLSEYE, "withConf")
.with("CREATE EXTENSION hstore;")
.with("CREATE SCHEMA TEST;")
.with("CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import io.airbyte.commons.json.Jsons;
import io.airbyte.commons.resources.MoreResources;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.Field;
import io.airbyte.protocol.models.JsonSchemaType;
import io.airbyte.protocol.models.v0.CatalogHelpers;
Expand Down Expand Up @@ -50,7 +50,7 @@ protected FeatureFlags featureFlags() {

@Override
protected void setupEnvironment(final TestDestinationEnv environment) throws Exception {
testdb = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_16_BULLSEYE, "withCert");
testdb = PostgresTestDatabase.in(BaseImage.POSTGRES_16_BULLSEYE, "withCert");
testdb.query(ctx -> {
ctx.fetch("CREATE TABLE id_and_name(id INTEGER, name VARCHAR(200));");
ctx.fetch("INSERT INTO id_and_name (id, name) VALUES (1,'picard'), (2, 'crusher'), (3, 'vash');");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

package io.airbyte.integrations.io.airbyte.integration_tests.sources;

import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;

public class PostgresSourceAcceptanceLegacyCtidTest extends PostgresSourceAcceptanceTest {

@Override
protected PostgresBaseImage getServerImage() {
return PostgresBaseImage.POSTGRES_12_BULLSEYE;
protected BaseImage getServerImage() {
return BaseImage.POSTGRES_12_BULLSEYE;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import io.airbyte.commons.features.FeatureFlagsWrapper;
import io.airbyte.commons.json.Jsons;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.Field;
import io.airbyte.protocol.models.JsonSchemaType;
import io.airbyte.protocol.models.v0.AirbyteCatalog;
Expand Down Expand Up @@ -201,8 +201,8 @@ private ConfiguredAirbyteCatalog getLimitPermissionConfiguredCatalog() {
.withSupportedSyncModes(Lists.newArrayList(SyncMode.FULL_REFRESH, SyncMode.INCREMENTAL)))));
}

protected PostgresBaseImage getServerImage() {
return PostgresBaseImage.POSTGRES_16_BULLSEYE;
protected BaseImage getServerImage() {
return BaseImage.POSTGRES_16_BULLSEYE;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import io.airbyte.commons.features.FeatureFlags;
import io.airbyte.commons.features.FeatureFlagsWrapper;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import java.sql.SQLException;

public class PostgresSourceDatatypeTest extends AbstractPostgresSourceDatatypeTest {
Expand All @@ -21,7 +21,7 @@ protected FeatureFlags featureFlags() {

@Override
protected Database setupDatabase() throws SQLException {
testdb = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_16_BULLSEYE, "withConf")
testdb = PostgresTestDatabase.in(BaseImage.POSTGRES_16_BULLSEYE, "withConf")
.with("CREATE SCHEMA %S;", SCHEMA_NAME)
.with("CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');")
.with("CREATE TYPE inventory_item AS (name text, supplier_id integer, price numeric);")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import io.airbyte.commons.features.FeatureFlagsWrapper;
import io.airbyte.commons.json.Jsons;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.Field;
import io.airbyte.protocol.models.JsonSchemaType;
import io.airbyte.protocol.models.v0.CatalogHelpers;
Expand Down Expand Up @@ -47,7 +47,7 @@ protected FeatureFlags featureFlags() {

@Override
protected void setupEnvironment(final TestDestinationEnv environment) throws Exception {
testdb = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_12_BULLSEYE)
testdb = PostgresTestDatabase.in(BaseImage.POSTGRES_12_BULLSEYE)
.with("CREATE TABLE id_and_name(id INTEGER, name VARCHAR(200));")
.with("INSERT INTO id_and_name (id, name) VALUES (1,'picard'), (2, 'crusher'), (3, 'vash');")
.with("CREATE TABLE starships(id INTEGER, name VARCHAR(200));")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import io.airbyte.commons.json.Jsons;
import io.airbyte.commons.util.AutoCloseableIterator;
import io.airbyte.commons.util.AutoCloseableIterators;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.Field;
import io.airbyte.protocol.models.JsonSchemaType;
import io.airbyte.protocol.models.v0.AirbyteCatalog;
Expand Down Expand Up @@ -889,8 +889,8 @@ protected void compareTargetPositionFromTheRecordsWithTargetPostionGeneratedBefo
assertTrue(extractPosition(record.getData()).targetLsn.compareTo(((PostgresCdcTargetPosition) targetPosition).targetLsn) >= 0);
}

protected static PostgresBaseImage getServerImage() {
return PostgresBaseImage.POSTGRES_16_BULLSEYE;
protected static BaseImage getServerImage() {
return BaseImage.POSTGRES_16_BULLSEYE;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import io.airbyte.commons.features.EnvVariableFeatureFlags;
import io.airbyte.commons.features.FeatureFlagsWrapper;
import io.airbyte.commons.json.Jsons;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.v0.AirbyteConnectionStatus;
import java.util.List;
import java.util.Map;
Expand All @@ -37,14 +37,14 @@ public class CloudDeploymentPostgresSourceTest {

@BeforeAll
static void setupContainers() {
DB_NO_SSL_WITH_NETWORK = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_16_BULLSEYE, "withNetwork");
DB_NO_SSL_WITH_NETWORK = PostgresTestDatabase.in(BaseImage.POSTGRES_16_BULLSEYE, "withNetwork");
NETWORK_NO_SSL = DB_NO_SSL_WITH_NETWORK.getContainer().getNetwork();
BASTION_NO_SSL = new SshBastionContainer();
BASTION_NO_SSL.initAndStartBastion(NETWORK_NO_SSL);

DB_WITH_SSL = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_SSL_DEV, "withSSL");
DB_WITH_SSL = PostgresTestDatabase.in(BaseImage.POSTGRES_SSL_DEV, "withSSL");

DB_WITH_SSL_WITH_NETWORK = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_SSL_DEV, "withSSL", "withNetwork");
DB_WITH_SSL_WITH_NETWORK = PostgresTestDatabase.in(BaseImage.POSTGRES_SSL_DEV, "withSSL", "withNetwork");
NETWORK_WITH_SSL = DB_WITH_SSL_WITH_NETWORK.getContainer().getNetwork();
BASTION_WITH_SSL = new SshBastionContainer();
BASTION_WITH_SSL.initAndStartBastion(NETWORK_WITH_SSL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import io.airbyte.cdk.db.jdbc.DefaultJdbcDatabase;
import io.airbyte.cdk.db.jdbc.JdbcDatabase;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.v0.AirbyteStreamNameNamespacePair;
import java.sql.SQLException;
import java.util.Set;
Expand All @@ -27,7 +27,7 @@ class PostgresCdcGetPublicizedTablesTest {

@BeforeEach
void setup() {
testdb = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_16_BULLSEYE, "withConf")
testdb = PostgresTestDatabase.in(BaseImage.POSTGRES_16_BULLSEYE, "withConf")
.with("create table table_1 (id serial primary key, text_column text);")
.with("create table table_2 (id serial primary key, text_column text);")
.with("create table table_irrelevant (id serial primary key, text_column text);")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import io.airbyte.commons.json.Jsons;
import io.airbyte.commons.resources.MoreResources;
import io.airbyte.commons.util.MoreIterators;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.integrations.source.postgres.internal.models.CursorBasedStatus;
import io.airbyte.integrations.source.postgres.internal.models.InternalModels.StateType;
import io.airbyte.protocol.models.Field;
Expand Down Expand Up @@ -90,7 +90,7 @@ protected PostgresSource source() {

@Override
protected PostgresTestDatabase createTestDatabase() {
return PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_16_BULLSEYE);
return PostgresTestDatabase.in(BaseImage.POSTGRES_16_BULLSEYE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
import io.airbyte.cdk.db.jdbc.DateTimeConverter;
import io.airbyte.commons.json.Jsons;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
Expand All @@ -34,7 +34,7 @@ class PostgresSourceOperationsTest {

@BeforeEach
public void init() {
testdb = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_16_BULLSEYE, "withConf");
testdb = PostgresTestDatabase.in(BaseImage.POSTGRES_16_BULLSEYE, "withConf");
}

@AfterEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import io.airbyte.cdk.db.jdbc.JdbcUtils;
import io.airbyte.commons.json.Jsons;
import io.airbyte.commons.util.MoreIterators;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.PostgresBaseImage;
import io.airbyte.integrations.source.postgres.PostgresTestDatabase.BaseImage;
import io.airbyte.protocol.models.Field;
import io.airbyte.protocol.models.JsonSchemaType;
import io.airbyte.protocol.models.v0.AirbyteCatalog;
Expand Down Expand Up @@ -77,7 +77,7 @@ class PostgresSourceSSLTest {

@BeforeEach
void setup() throws Exception {
testdb = PostgresTestDatabase.in(PostgresBaseImage.POSTGRES_SSL_DEV, "withSSL")
testdb = PostgresTestDatabase.in(BaseImage.POSTGRES_SSL_DEV, "withSSL")
.with("CREATE TABLE id_and_name(id NUMERIC(20, 10) NOT NULL, name VARCHAR(200) NOT NULL, power double precision NOT NULL, PRIMARY KEY (id));")
.with("CREATE INDEX i1 ON id_and_name (id);")
.with("INSERT INTO id_and_name (id, name, power) VALUES (1,'goku', 'Infinity'), (2, 'vegeta', 9000.1), ('NaN', 'piccolo', '-Infinity');")
Expand Down
Loading

0 comments on commit e291199

Please sign in to comment.