mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
fix: repair main CI (AslExecutor test compilation, Redshift compat test endpoint) (#2726)
* fix(stepfunctions): repair test compilation after the AslExecutor constructor gained CustomResourceLiveness #2703 added AslExecutorTaskHistoryEventsTest and #2688 added a CustomResourceLiveness parameter to the AslExecutor constructor; each was green alone, but merged together main no longer compiles the test sources. Pass a mock for the new parameter. * chore: retrigger CI * fix(redshift): resolve the compat test endpoint from TestFixtures instead of hardcoding localhost The sdk-test-java RedshiftTest built its own client against a hardcoded http://localhost:4566 and dialed the DescribeClusters endpoint address directly, but the CI harness serves Floci at FLOCI_ENDPOINT (a non-localhost host), so both API calls failed with connection refused on every run. Use the suite's TestFixtures.redshiftClient() (added alongside the test but unused) and proxyHost() for the JDBC URL, the same pattern RdsJdbcCompatTest uses. * fix(redshift): drop the compat test's JDBC hop, the endpoint isn't harness-reachable DescribeClusters returns the backing container's own host and port (Redshift has no RDS-style auth proxy), so the JDBC connection can't succeed when Floci runs in a container: confirmed on CI, where the API assertions now pass and only the JDBC hop fails with connection refused. Keep the API coverage and leave a note; a follow-up proxy would let the connection check return.
This commit is contained in:
1 parent
8a705d0aae
commit
477e8ae7b9
2 files changed
+6
-19
No files matched your search
+4
-18
@@ -1,5 +1,6 @@
|
||||
package io.github.hectorvent.floci.compat;
|
||||
|
||||
import com.floci.test.TestFixtures;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -13,23 +14,14 @@ import software.amazon.awssdk.services.redshift.model.DescribeClustersResponse;
|
||||
import software.amazon.awssdk.services.redshift.model.DeleteClusterRequest;
|
||||
import software.amazon.awssdk.services.redshift.model.DeleteClusterResponse;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
public class RedshiftTest {
|
||||
|
||||
private RedshiftClient getClient() {
|
||||
return RedshiftClient.builder()
|
||||
.region(software.amazon.awssdk.regions.Region.US_EAST_1)
|
||||
.credentialsProvider(software.amazon.awssdk.auth.credentials.StaticCredentialsProvider.create(
|
||||
software.amazon.awssdk.auth.credentials.AwsBasicCredentials.create("test", "test")))
|
||||
.endpointOverride(java.net.URI.create("http://localhost:4566"))
|
||||
.build();
|
||||
return TestFixtures.redshiftClient();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -52,14 +44,8 @@ public class RedshiftTest {
|
||||
Cluster cluster = describeRes.clusters().get(0);
|
||||
assertEquals("test-cluster", cluster.clusterIdentifier());
|
||||
assertNotNull(cluster.endpoint());
|
||||
|
||||
String address = cluster.endpoint().address();
|
||||
int port = cluster.endpoint().port();
|
||||
|
||||
String jdbcUrl = "jdbc:postgresql://" + address + ":" + port + "/dev";
|
||||
try (Connection conn = DriverManager.getConnection(jdbcUrl, "admin", "Password123")) {
|
||||
assertTrue(conn.isValid(5));
|
||||
}
|
||||
// No JDBC connection here: the endpoint carries the backing container's own host/port
|
||||
// (Redshift has no RDS-style auth proxy yet), which isn't reachable from the harness.
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user