@@ -44,18 +44,9 @@ public abstract class AbstractHubTest extends VaultTest {
4444 credentials ();
4545 }
4646
47- private static final HubTestConfig .VaultSpec minioSTSVaultConfig = new HubTestConfig .VaultSpec ("MinIO STS" , "732D43FA-3716-46C4-B931-66EA5405EF1C" ,
48- null , null , "eu-central-1" );
49- private static final HubTestConfig .VaultSpec minioStaticVaultConfig = new HubTestConfig .VaultSpec ("MinIO static" , "71B910E0-2ECC-46DE-A871-8DB28549677E" ,
50- "minioadmin" , "minioadmin" , "us-east-1" );
51- private static final HubTestConfig .VaultSpec awsSTSVaultConfig = new HubTestConfig .VaultSpec ("AWS STS" , "844BD517-96D4-4787-BCFA-238E103149F6" ,
52- null , null , "eu-west-1" );
53- private static final HubTestConfig .VaultSpec awsStaticVaultConfig = new HubTestConfig .VaultSpec ("AWS static" , "72736C19-283C-49D3-80A5-AB74B5202543" ,
54- PROPERTIES .get ("handmade2.s3.amazonaws.com.username" ), PROPERTIES .get ("handmade2.s3.amazonaws.com.password" ), "us-east-1"
55- );
5647
5748 /**
58- * Local : hub, Keycloak, MinIO started via testcontainers+docker-compose.
49+ * LOCAL : hub, Keycloak, MinIO, localstack started via testcontainers+docker-compose.
5950 */
6051 public static final HubTestConfig .Setup LOCAL ;
6152 public static final HubTestConfig .Setup .DockerConfig LOCAL_DOCKER_CONFIG ;
@@ -69,27 +60,18 @@ public abstract class AbstractHubTest extends VaultTest {
6960 .withDockerConfig (LOCAL_DOCKER_CONFIG );
7061 }
7162
72- private static final Function <HubTestConfig .VaultSpec , Arguments > argumentUnattendedLocalOnly = vs -> Arguments .of (Named .of (
63+ private static final Function <HubTestConfig .VaultSpec , Arguments > prepareArgumentLocal = vs -> Arguments .of (Named .of (
7364 String .format ("%s %s" , vs .storageProfileName , LOCAL .hubURL ),
7465 new HubTestConfig (LOCAL , vs )));
7566
67+ public static final Arguments LOCAL_MINIO_STATIC = prepareArgumentLocal .apply (new HubTestConfig .VaultSpec (
68+ "MinIO static" , "71B910E0-2ECC-46DE-A871-8DB28549677E" , "testuser" , "top-secret" , "us-east-1" ));
69+ public static final Arguments LOCAL_MINIO_STS = prepareArgumentLocal .apply (new HubTestConfig .VaultSpec (
70+ "MinIO STS" , "732D43FA-3716-46C4-B931-66EA5405EF1C" , null , null , "eu-central-1" ));
7671
77- public static final Arguments LOCAL_MINIO_STATIC = argumentUnattendedLocalOnly .apply (minioStaticVaultConfig );
78- public static final Arguments LOCAL_MINIO_STS = argumentUnattendedLocalOnly .apply (minioSTSVaultConfig );
7972
8073 /**
81- * Local attended: re-use running local stetup.
82- */
83- private static final HubTestConfig .Setup LOCAL_ATTENDED = new HubTestConfig .Setup ()
84- .withHubURL ("http://localhost:8080" )
85- .withAdminConfig (new HubTestConfig .Setup .UserConfig ("admin" , "admin" , staticSetupCode ()))
86- .withUserConfig (new HubTestConfig .Setup .UserConfig ("alice" , "asd" , staticSetupCode ()));
87- private static final Function <HubTestConfig .VaultSpec , Arguments > argumentAttendedLocalOnly = vs -> Arguments .of (Named .of (
88- String .format ("%s %s" , vs .storageProfileName , LOCAL_ATTENDED .hubURL ),
89- new HubTestConfig (LOCAL_ATTENDED , vs )));
90-
91- /**
92- * Hybrid: local hub (testcontainers+docker-compose) against AWS/MinIO/Keycloak remote.
74+ * HYBRID: local hub (testcontainers+docker-compose) against AWS/MinIO/Keycloak remote.
9375 */
9476 public static final HubTestConfig .Setup HYBRID ;
9577 public static final HubTestConfig .Setup .DockerConfig HYBRID_DOCKER_CONFIG ;
@@ -98,7 +80,7 @@ public abstract class AbstractHubTest extends VaultTest {
9880 HYBRID_DOCKER_CONFIG = new HubTestConfig .Setup .DockerConfig (
9981 "/docker-compose-minio-localhost-hub.yml" ,
10082 "/.hybrid.env" ,
101- null ,
83+ "hybrid" ,
10284 PROPERTIES .get ("testing.katta.cloud.chipotle.admin.name" ),
10385 PROPERTIES .get ("testing.katta.cloud.chipotle.admin.password" ),
10486 PROPERTIES .get ("testing.katta.cloud.chipotle.syncer.password" )
@@ -120,15 +102,27 @@ public abstract class AbstractHubTest extends VaultTest {
120102 .withDockerConfig (HYBRID_DOCKER_CONFIG );
121103 }
122104
123- private static final Function <HubTestConfig .VaultSpec , Arguments > argumentUnattendedHybrid = vs -> Arguments .of (Named .of (
105+ private static final Function <HubTestConfig .VaultSpec , Arguments > prepareArgumentsHybrid = vs -> Arguments .of (Named .of (
124106 String .format ("%s %s" , vs .storageProfileName , HYBRID .hubURL ),
125107 new HubTestConfig (HYBRID , vs )));
126108
127109
128- public static final Arguments HYBRID_MINIO_STATIC = argumentUnattendedHybrid .apply (minioStaticVaultConfig );
129- public static final Arguments HYBRID_MINIO_STS = argumentUnattendedHybrid .apply (minioSTSVaultConfig );
130- public static final Arguments HYBRID_AWS_STATIC = argumentUnattendedHybrid .apply (awsStaticVaultConfig );
131- public static final Arguments HYBRID_AWS_STS = argumentUnattendedHybrid .apply (awsSTSVaultConfig );
110+ public static final Arguments HYBRID_MINIO_STATIC = prepareArgumentsHybrid .apply (new HubTestConfig .VaultSpec (
111+ "MinIO static" , "71B910E0-2ECC-46DE-A871-8DB285496779" , PROPERTIES .get ("minio.testing.katta.cloud.handmade_access_user.name" ), PROPERTIES .get ("minio.testing.katta.cloud.handmade_access_user.password" ), "us-east-1"
112+ ));
113+ public static final Arguments HYBRID_MINIO_STS = prepareArgumentsHybrid .apply (new HubTestConfig .VaultSpec (
114+ "MinIO STS" , "732D43FA-3716-46C4-B931-66EA5405EF19" , null , null , "eu-central-1"
115+ ));
116+
117+ public static final Arguments HYBRID_AWS_STATIC = prepareArgumentsHybrid .apply (new HubTestConfig .VaultSpec (
118+ "AWS static" , "72736C19-283C-49D3-80A5-AB74B5202549" , PROPERTIES .get ("handmade2.s3.amazonaws.com.username" ), PROPERTIES .get ("handmade2.s3.amazonaws.com.password" ),
119+ // TODO https://github.com/shift7-ch/katta-server/issues/87
120+ // "eu-north-1"
121+ "us-east-1"
122+ ));
123+ public static final Arguments HYBRID_AWS_STS = prepareArgumentsHybrid .apply (new HubTestConfig .VaultSpec (
124+ "AWS STS" , "844BD517-96D4-4787-BCFA-238E103149F9" , null , null , "eu-west-1"
125+ ));
132126
133127 @ BeforeEach
134128 public void preferences () throws IOException {
0 commit comments