88import org .apache .logging .log4j .Logger ;
99import org .junit .jupiter .api .AfterAll ;
1010import org .junit .jupiter .api .BeforeAll ;
11+ import org .junit .jupiter .api .BeforeEach ;
1112import org .testcontainers .containers .ComposeContainer ;
1213import org .testcontainers .containers .wait .strategy .LogMessageWaitStrategy ;
1314
1920import java .util .Properties ;
2021import java .util .stream .Collectors ;
2122
23+ import cloud .katta .protocols .hub .HubSession ;
2224import cloud .katta .testsetup .AbstractHubTest ;
2325import cloud .katta .testsetup .HubTestConfig ;
2426import cloud .katta .testsetup .HubTestSetupDockerExtension ;
@@ -27,6 +29,8 @@ public class AbtractAdminCliIT extends AbstractHubTest {
2729 private static final Logger log = LogManager .getLogger (AbtractAdminCliIT .class .getName ());
2830 public static ComposeContainer compose ;
2931
32+ protected HubSession hubSession ;
33+
3034 @ BeforeAll
3135 public static void setupDocker () throws URISyntaxException , IOException {
3236 final HubTestConfig .Setup .DockerConfig configuration = new HubTestConfig .Setup .DockerConfig ("/docker-compose-minio-localhost-hub.yml" , "/.local.env" , "local" , "admin" , "admin" , "top-secret" );
@@ -54,6 +58,14 @@ public static void setupDocker() throws URISyntaxException, IOException {
5458 log .info ("Done setup docker {}" , configuration );
5559 }
5660
61+ @ BeforeEach
62+ protected void setup () throws Exception {
63+ final HubTestConfig .Setup config = new HubTestConfig .Setup ().withUserConfig (
64+ new HubTestConfig .Setup .UserConfig ("admin" , "admin" , "setupcode" )
65+ ).withHubURL ("http://localhost:8280" );
66+ hubSession = setupConnection (config );
67+ }
68+
5769 @ AfterAll
5870 public static void teardownDocker () {
5971 try {
0 commit comments