Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed code-style, no changes in logic #18390

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ public static SSLContext createContextFromCaCert(String caCertificate) {
try {
CertificateFactory factory = CertificateFactory.getInstance(X509);
Certificate trustedCa = factory.generateCertificate(
new ByteArrayInputStream(caCertificate.getBytes(StandardCharsets.UTF_8))
);
new ByteArrayInputStream(caCertificate.getBytes(StandardCharsets.UTF_8)));
KeyStore trustStore = KeyStore.getInstance(PKCS_12);
trustStore.load(null, null);
trustStore.setCertificateEntry("ca", trustedCa);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,20 @@

package io.airbyte.integrations.destination.elasticsearch;

import static org.junit.jupiter.api.Assertions.assertEquals;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableMap;
import io.airbyte.commons.json.Jsons;
import io.airbyte.config.StandardCheckConnectionOutput.Status;
import io.airbyte.integrations.standardtest.destination.DestinationAcceptanceTest;
import io.airbyte.integrations.standardtest.destination.comparator.AdvancedTestDataComparator;
import io.airbyte.integrations.standardtest.destination.comparator.TestDataComparator;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.List;
import java.util.Map;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.testcontainers.elasticsearch.ElasticsearchContainer;

public class ElasticsearchStrictEncryptDestinationAcceptanceTest extends DestinationAcceptanceTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public static ConnectorConfiguration fromJsonNode(JsonNode config) {
return new ObjectMapper().convertValue(config, ConnectorConfiguration.class);
}


@Data
static class AuthenticationMethod {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public ElasticsearchConnection(ConnectorConfiguration config) {
final RestClientBuilder builder = RestClient.builder(httpHost);

// Set custom user's certificate if provided
if (config.getCaCertificate() != null && !config.getCaCertificate().isEmpty()){
if (config.getCaCertificate() != null && !config.getCaCertificate().isEmpty()) {
builder.setHttpClientConfigCallback(clientBuilder -> {
clientBuilder.setSSLContext(SSLCertificateUtils.createContextFromCaCert(config.getCaCertificate()));
return clientBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pendulum
from airbyte_cdk.models import SyncMode
from airbyte_cdk.sources.streams import Stream
from airbyte_cdk.sources.utils.transform import TypeTransformer, TransformConfig
from airbyte_cdk.sources.utils.transform import TransformConfig, TypeTransformer
from chargebee import APIError
from chargebee.list_result import ListResult
from chargebee.model import Model
Expand Down
Loading