/** * Make sure we can reuse the provider for two different runtimes. * TODO: replace with more lightweight image and non-internal (minishift?) environment. * @throws Exception */ @Test public void testProviderConfigReuse() throws Exception { OpenShiftProviderConfigImpl providerConfig = new OpenShiftProviderConfigImpl().clear(); providerConfig.setName(getClass().getSimpleName()); providerConfig.setKubernetesMaster("https://ce-os-rhel-master.usersys.redhat.com:8443"); providerConfig.setKubernetesAuthBasicUsername("admin"); providerConfig.setKubernetesAuthBasicPassword("admin"); OpenShiftClient client = new OpenShiftAccessInterfaceImpl().newOpenShiftClient(providerConfig); OpenShiftRuntimeConfigImpl runtimeConfigA = createRuntimeConfig("tpcr1"); OpenShiftRuntimeConfigImpl runtimeConfigB = createRuntimeConfig("tpcr2"); client.create(runtimeConfigA); client.create(runtimeConfigB); client.destroy(runtimeConfigA.getRuntimeId().toString()); client.destroy(runtimeConfigB.getRuntimeId().toString()); }
/** * Make sure we can reuse the provider for two different runtimes. * TODO: replace with more lightweight image and non-internal (minishift?) environment. * @throws Exception */ @Test public void testProviderConfigReuse() throws Exception { OpenShiftProviderConfigImpl providerConfig = new OpenShiftProviderConfigImpl().clear(); providerConfig.setName(getClass().getSimpleName()); providerConfig.setKubernetesMaster("https://ce-os-rhel-master.usersys.redhat.com:8443"); providerConfig.setKubernetesAuthBasicUsername("admin"); providerConfig.setKubernetesAuthBasicPassword("admin"); OpenShiftClient client = new OpenShiftAccessInterfaceImpl().newOpenShiftClient(providerConfig); OpenShiftRuntimeConfigImpl runtimeConfigA = createRuntimeConfig("tpcr1"); OpenShiftRuntimeConfigImpl runtimeConfigB = createRuntimeConfig("tpcr2"); client.create(runtimeConfigA); client.create(runtimeConfigB); client.destroy(runtimeConfigA.getRuntimeId().toString()); client.destroy(runtimeConfigB.getRuntimeId().toString()); }