Skip to content

Parameterize tests with different domain home source types #1776

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

Merged
merged 61 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
74aca8e
parameterize domain type initial commit
xiancao Jun 24, 2020
cf8d4a5
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jun 24, 2020
bf0958e
cleanup
xiancao Jun 24, 2020
1518574
create domains in initAll
xiancao Jun 25, 2020
a3aca35
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jun 25, 2020
975c01b
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jun 29, 2020
cd7ec4c
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jun 29, 2020
336de4c
parameterize scale domain tests
xiancao Jun 29, 2020
fbf2ff0
cleanup
xiancao Jun 30, 2020
21c4727
remove old ItPodsRestart and ItScaleMiiDomainNginx
xiancao Jun 30, 2020
db325f8
change spec.ImagePullSecrets for domainInPV
xiancao Jun 30, 2020
16af40e
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jun 30, 2020
cc9e611
verify pv exists
xiancao Jun 30, 2020
33b9b9e
mv KIND_REPO check before creating domain-in-pv domain
xiancao Jul 1, 2020
bf4edf5
debug wldf on jenkins run
xiancao Jul 1, 2020
2fa5a2e
debug wldf on jenkins run 2
xiancao Jul 1, 2020
7cec4f8
set wldf alarm type to manual
xiancao Jul 1, 2020
1d316c5
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 1, 2020
5f04639
add more wldf debug info
xiancao Jul 1, 2020
d1894a7
try scale with wldf in different test methods
xiancao Jul 1, 2020
7c0df0e
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 2, 2020
683d104
add more debug info for wldf
xiancao Jul 2, 2020
7e9f361
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 2, 2020
1599ef0
debug wldf issue
xiancao Jul 3, 2020
eccf79d
get the latest develop
xiancao Jul 13, 2020
5e9a41f
enable mii domain
xiancao Jul 13, 2020
697a3fe
add more debug info in scalingAction.sh
xiancao Jul 14, 2020
5357fd8
add more wait time for debugging
xiancao Jul 14, 2020
d719e0a
add more debug info in scalingAction.sh
xiancao Jul 14, 2020
bbbbef9
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 14, 2020
79a1356
add longer wait time for debug
xiancao Jul 14, 2020
36bb6c6
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 14, 2020
5a06c43
add domainNameSpace in clusterrolebinding name
xiancao Jul 14, 2020
1cd2aeb
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 14, 2020
ee2c9bf
enable all tests
xiancao Jul 15, 2020
c995bbe
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 15, 2020
52107ac
debug domaininpv app access in parallel run
xiancao Jul 15, 2020
06f0eea
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 15, 2020
72d71a9
add more debug info for domaininpv parallel run
xiancao Jul 15, 2020
20d7418
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 15, 2020
4291e69
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 16, 2020
0f0f02f
enable verbose for curl command
xiancao Jul 16, 2020
292399e
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 17, 2020
788d5f8
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 20, 2020
f8ca327
update JAVA_URL in Dockerfile
xiancao Jul 20, 2020
cbf4bbb
address proxy client hanging issue
xiancao Jul 20, 2020
c8aed08
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 20, 2020
06d5c68
use httpclient to access sample app
xiancao Jul 22, 2020
14e1a34
get the latest develop
xiancao Jul 22, 2020
ad8c4fe
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 23, 2020
73cdd10
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 24, 2020
6baf36a
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 27, 2020
6d3372d
debug domaininpv 404 issue in parallel run
xiancao Jul 27, 2020
7e7f30b
consolidate test classes
xiancao Jul 29, 2020
38b20bc
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernet…
xiancao Jul 29, 2020
77f5020
address review comments
xiancao Jul 29, 2020
29d8fdc
make admin server routing optional
xiancao Jul 30, 2020
be608db
get the latest develop
xiancao Jul 30, 2020
3c89917
address Vanaja's review comments
xiancao Aug 3, 2020
3a95584
clean up
xiancao Aug 3, 2020
caa383a
address Marina's review comments
xiancao Aug 4, 2020
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
Prev Previous commit
Next Next commit
address Vanaja's review comments
  • Loading branch information
xiancao committed Aug 3, 2020
commit 3c89917a6bdd2e88c54f8df55cfcb7c19e85d5d7
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

Expand Down Expand Up @@ -164,6 +165,7 @@ class ItParameterizedDomain {
private static boolean isUseSecret = true;
private static List<Domain> domains = new ArrayList<>();
private static LoggingFacade logger = null;
private static Domain miiDomain = null;

private String curlCmd = null;

Expand Down Expand Up @@ -202,7 +204,7 @@ public static void initAll(@Namespaces(5) List<String> namespaces) {
opServiceAccount = opNamespace + "-sa";

// get a free port for external REST HTTPS port
externalRestHttpsPort = getNextFreePort(31001, 31201);
//externalRestHttpsPort = getNextFreePort(31001, 31201);

//determine if the tests are running in Kind cluster. if true use images from Kind registry
if (KIND_REPO != null) {
Expand All @@ -213,9 +215,11 @@ public static void initAll(@Namespaces(5) List<String> namespaces) {
}

// install and verify operator with REST API
installAndVerifyOperator(opNamespace, opServiceAccount, true, externalRestHttpsPort,
installAndVerifyOperator(opNamespace, opServiceAccount, true, 0,
miiDomainNamespace, domainInPVNamespace, domainInImageNamespace);

externalRestHttpsPort = getServiceNodePort(opNamespace, "external-weblogic-operator-svc");

// install and verify NGINX
nginxHelmParams = installAndVerifyNginx(nginxNamespace, 0, 0);
String nginxServiceName = nginxHelmParams.getReleaseName() + "-nginx-ingress-controller";
Expand All @@ -224,7 +228,7 @@ public static void initAll(@Namespaces(5) List<String> namespaces) {
logger.info("NGINX http node port: {0}", nodeportshttp);

// create model in image domain with multiple clusters
Domain miiDomain = createMiiDomainWithMultiClusters(miiDomainNamespace);
miiDomain = createMiiDomainWithMultiClusters(miiDomainNamespace);
// create domain in image
Domain domainInImage = createAndVerifyDomainInImageUsingWdt(domainInImageNamespace);
// create domain in pv
Expand Down Expand Up @@ -355,10 +359,10 @@ public void testAdminConsoleLoginUsingIngressController(Domain domain) {
/**
* Verify liveness probe by killing managed server process 3 times to kick pod container auto-restart.
*/
@ParameterizedTest
@Test
@DisplayName("Test liveness probe of pod")
@MethodSource("domainProvider")
public void testLivenessProbe(Domain domain) {
public void testLivenessProbe() {
Domain domain = miiDomain;
assertDomainNotNull(domain);
String domainUid = domain.getSpec().getDomainUid();
String domainNamespace = domain.getMetadata().getNamespace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,17 @@ public static int getServiceNodePort(String namespace, String serviceName, Strin
return Service.getServiceNodePort(namespace, serviceName, channelName);
}

/**
* Get node port of a namespaced service.
*
* @param namespace name of the namespace in which to get the service
* @param serviceName name of the service
* @return node port if service is found, otherwise -1
*/
public static Integer getServiceNodePort(String namespace, String serviceName) {
return Service.getServiceNodePort(namespace, serviceName);
}

/**
* Get port of a namespaced service given the channel name.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ public static int getServiceNodePort(String namespace, String serviceName, Strin
return Kubernetes.getServiceNodePort(namespace, serviceName, channelName);
}

/**
* Get node port of a namespaced service.
*
* @param namespace name of the namespace in which to get the service
* @param serviceName name of the service
* @return node port if service and channel is found, otherwise -1
*/
public static int getServiceNodePort(String namespace, String serviceName) {
return Kubernetes.getServiceNodePort(namespace, serviceName);
}

/**
* Get port of a namespaced service given the channel name.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,23 @@ public static int getServiceNodePort(String namespace, String serviceName, Strin
return -1;
}

/**
* Get port of a namespaced service.
*
* @param namespace name of the namespace in which to get the service
* @param serviceName name of the service
* @return node port if service found otherwise -1
*/
public static Integer getServiceNodePort(String namespace, String serviceName) {
List<V1Service> services = listServices(namespace).getItems();
for (V1Service service : services) {
if (service.getMetadata().getName().startsWith(serviceName)) {
return service.getSpec().getPorts().get(0).getNodePort();
}
}
return -1;
}

/**
* Get port of a namespaced service given the channel name.
*
Expand Down