Skip to content

Commit bb35384

Browse files
robertpatrickCarolynRountreerakillen
authored
Modularize alias tests (#1221)
* add defaults and derived default flag * default value change * default value change * Update WLSDeployZipFile.java remove println * adding uses_path_tokens, where appropriate * fixing a broken unit test caused by adding uses_path_tokens to the FileStore Directory attribute * renaming the top-level system-test directory * Corrected error message key * fixing merge issues * Corrected token name * Fixed attributes with "None" values, server template date format and algorithms * Restored SecurityConfiguration PasswordDigestEnabled and ActiveType to match WLS * Fix for flattened folders without tokens in location * moving alias-test directory * intermediate checkpoint after online generation * first pass at generation without upload complete * removing filtering of files that no longer exist * reformatting the generated file names * more steps to get the generated file names into the Maven project properties * generate working all the way through * adding enforcer rule for alias_test_tenancy property * moving upload to install phase * random improvements * first pass at verify complete * fixing bugs and sorting report output locations * adding enforcer rule for alias_test_tenancy property * fixing build and removing conflict markers Co-authored-by: Carolyn Rountree <[email protected]> Co-authored-by: Richard Killen <[email protected]>
1 parent b40250a commit bb35384

File tree

96 files changed

+5431
-1456818
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+5431
-1456818
lines changed

core/src/main/python/wlsdeploy/tool/discover/discoverer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def _populate_model_parameters(self, dictionary, location):
130130

131131
# if attribute was never set (online only), don't add to the model
132132
try:
133-
134133
if self._omit_from_model(location, wlst_lsa_param):
135134
_logger.finest('WLSDPLY-06157', wlst_lsa_param, str(location), class_name=_class_name,
136135
method_name=_method_name)

documentation/2.0/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.fr.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ Les paramètres de configuration du mermaid peuvent également être définis su
7272
> À la page "Architecture", vous avez besoin d'un diagramme de classe. Vous pouvez régler les paramètres de mermaid localement pour ne charger que la sirène sur cette page (pas sur les autres).
7373
7474
Vous pouvez également désactiver mermaid pour des pages spécifiques tout en l'activant globalement.
75-
<<<<<<< HEAD
7675

7776
## Configuration du bouton Accueil
7877

@@ -106,5 +105,3 @@ landingPageName = "<i class='fas fa-home'></i> Home"
106105
Le bouton d'accueil va ressembler à ceci:
107106

108107
![Default Home Button](/en/basics/configuration/images/home_button_defaults.jpg?width=100%)
109-
=======
110-
>>>>>>> 023fe7ef2b4c45fe66ac932d9e25d09f30b74a4e

integration-tests/alias-test/generate/pom.xml

Lines changed: 348 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
def skip = project.properties.skip
2+
if (skip == 'true') {
3+
println "Execution skipped"
4+
return
5+
}
6+
7+
def dirName = project.properties.buildDir
8+
def directory = new File(dirName)
9+
if (!directory.isDirectory()) {
10+
println "The ${directory.getAbsolutePath()} does not exist"
11+
System.exit(1)
12+
}
13+
println "The ${directory.getAbsolutePath()} exists"
14+
15+
def onlineFiles = []
16+
directory.eachFileMatch(~/generatedOnline.*\.json/) {
17+
onlineFiles << it.name
18+
}
19+
20+
if (onlineFiles.size() > 0) {
21+
println "Setting Maven project property alias-test-generated-online-file-name to ${onlineFiles[0]}"
22+
project.properties.setProperty("alias-test-generated-online-file-name", onlineFiles[0])
23+
}
24+
25+
def offlineFiles = []
26+
directory.eachFileMatch(~/generatedOffline.*\.json/) {
27+
offlineFiles << it.name
28+
}
29+
30+
if (offlineFiles.size() > 0) {
31+
println "Setting Maven project property alias-test-generated-offline-file-name to ${offlineFiles[0]}"
32+
project.properties.setProperty("alias-test-generated-offline-file-name", offlineFiles[0])
33+
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#!/usr/bin/env sh
2+
#
3+
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
4+
# The Universal Permissive License (UPL), Version 1.0
5+
#
6+
7+
if [ -z "${ORACLE_HOME}" ]; then
8+
echo "ORACLE_HOME environment variable must be set" >&2
9+
exit 1
10+
fi
11+
12+
if [ -z "${JAVA_HOME}" ]; then
13+
echo "Please set the JAVA_HOME environment variable to point to a Java installation compatible with the WebLogic version" >&2
14+
exit 1
15+
fi
16+
17+
if [ -z "${WLSDEPLOY_HOME}" ]; then
18+
echo "WLSDEPLOY_HOME environment variable must be set" >&2
19+
exit 1
20+
fi
21+
22+
# Process command-line args
23+
WDT_MODEL=""
24+
WDT_ARCHIVE=""
25+
DOMAIN_PARENT_DIR=""
26+
while [[ $# -gt 1 ]]; do
27+
key="$1"
28+
case $key in
29+
-model_file)
30+
WDT_MODEL="$2"
31+
shift
32+
;;
33+
-archive_file)
34+
WDT_ARCHIVE="$2"
35+
shift
36+
;;
37+
-domain_parent)
38+
DOMAIN_PARENT_DIR="$2"
39+
shift
40+
;;
41+
*)
42+
# unknown option
43+
;;
44+
esac
45+
shift # past arg or value
46+
done
47+
48+
# Verify command-line args
49+
if [ -z "${WDT_MODEL}" ]; then
50+
echo "Required command-line argument -model_file was not specified" >&2
51+
exit 1
52+
elif [ ! -f "${WDT_MODEL}" ]; then
53+
echo "Specified model file does not exist: ${WDT_MODEL}"
54+
exit 1
55+
fi
56+
57+
if [ -z "${WDT_ARCHIVE}" ]; then
58+
echo "Required command-line argument -archive_file was not specified" >&2
59+
exit 1
60+
elif [ ! -f "${WDT_ARCHIVE}" ]; then
61+
echo "Specified archive file does not exist: ${WDT_ARCHIVE}"
62+
exit 1
63+
fi
64+
65+
if [ -z "${DOMAIN_PARENT_DIR}" ]; then
66+
echo "Required command-line argument -domain_parent was not specified" >&2
67+
exit 1
68+
fi
69+
70+
# Clean up any old domain directory
71+
rm -rf "${DOMAIN_PARENT_DIR}"
72+
mkdir -p "${DOMAIN_PARENT_DIR}"
73+
74+
"${WLSDEPLOY_HOME}/bin/createDomain.sh" \
75+
-oracle_home "${ORACLE_HOME}" \
76+
-domain_parent "${DOMAIN_PARENT_DIR}" \
77+
-model_file "${WDT_MODEL}" \
78+
-archive_file "${WDT_ARCHIVE}"
79+
80+
RETURN_CODE=$?
81+
if [ "${RETURN_CODE}" != "0" ]; then
82+
echo "createDomain failed with exit code ${RETURN_CODE}" >&2
83+
exit ${RETURN_CODE}
84+
fi
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
#!/usr/bin/env sh
2+
# *****************************************************************************
3+
# doGenerateOffline.sh
4+
#
5+
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
6+
# The Universal Permissive License (UPL), Version 1.0
7+
#
8+
# NAME
9+
# doGenerateOffline.sh - generate a JSON file with descriptions for the offline MBeans.
10+
#
11+
# DESCRIPTION
12+
# This script connects reads the domain home and collects the information about the different
13+
# MBeans that exist.
14+
#
15+
# This script uses the following command-line arguments directly, the rest
16+
# of the arguments are passed down to the underlying python program:
17+
#
18+
# - -oracle_home The location of the Oracle Home version for the generate job.
19+
# - -output_dir The location where to store the generated files and reports
20+
# and where to read the generated files to create the reports.
21+
# - -domain_home The directory where the domain is installed
22+
# - -status_dir The directory where the successful completion status file will be created.
23+
#
24+
# This script uses the following variables:
25+
#
26+
# JAVA_HOME - The location of the JDK to use. The caller must set
27+
# this variable to a valid Java 7 (or later) JDK.
28+
#
29+
# TEST_HOME - The location of the WLS Deploy Alias System Test installation.
30+
#
31+
# WLSDEPLOY_HOME - The location of the WLS Deploy installation.
32+
#
33+
# WLSDEPLOY_PROPERTIES - Extra system properties to pass to WLST. The caller
34+
# can use this environment variable to add additional
35+
# system properties to the WLST environment.
36+
#
37+
38+
scriptPath="$(dirname "$0")"
39+
BASEDIR="$(pwd)"
40+
41+
. "${scriptPath}/helpers.sh"
42+
43+
WLSDEPLOY_PROGRAM_NAME="alias_test_generate_offline"; export WLSDEPLOY_PROGRAM_NAME
44+
45+
if [ "${WLSDEPLOY_HOME}" = "" ]; then
46+
echo "WLSDEPLOY_HOME environment variable must be set" >&2
47+
exit 1
48+
fi
49+
50+
if [ ! -d ${TEST_HOME} ]; then
51+
echo "Specified TEST_HOME of ${TEST_HOME} does not exist"
52+
exit 1
53+
fi
54+
55+
if [ "${JAVA_HOME}" = "" ]; then
56+
echo "Please set the JAVA_HOME environment variable to point to a Java installation compatible with the WebLogic version" >&2
57+
exit 1
58+
fi
59+
60+
#
61+
# Find the args required to determine the WLST script to run
62+
#
63+
OUTPUT_DIR="${BASEDIR}/target"
64+
STATUS_DIR=""
65+
66+
while [[ $# -gt 1 ]]; do
67+
key="$1"
68+
case $key in
69+
-oracle_home)
70+
ORACLE_HOME="$2"
71+
shift
72+
;;
73+
-domain_home)
74+
DOMAIN_HOME="$2"
75+
shift
76+
;;
77+
-output_dir)
78+
OUTPUT_DIR="$2"
79+
shift
80+
;;
81+
-status_dir)
82+
STATUS_DIR="$2"
83+
shift
84+
;;
85+
*)
86+
# unknown option
87+
;;
88+
esac
89+
shift # past arg or value
90+
done
91+
92+
#
93+
# Check for values of required arguments for this script to continue.
94+
# The underlying WLST script has other required arguments.
95+
#
96+
echo "ORACLE_HOME=${ORACLE_HOME}"
97+
if [ "${ORACLE_HOME}" = "" ]; then
98+
echo "Required argument -oracle_home not provided" >&2
99+
exit 1
100+
fi
101+
102+
echo "DOMAIN_HOME=${DOMAIN_HOME}"
103+
if [ "${DOMAIN_HOME}" = "" ]; then
104+
echo "Required argument -domain_home not provided" >&2
105+
exit 1
106+
fi
107+
108+
echo "OUTPUT_DIR=${OUTPUT_DIR}"
109+
mkdir -p "${OUTPUT_DIR}"
110+
111+
if [ -z "${STATUS_DIR}" ]; then
112+
STATUS_DIR="${OUTPUT_DIR}/generate-status"
113+
fi
114+
115+
#
116+
# Verify that the doGenerateSC and doGenerateOnline scripts completed successfully; otherwise, exit.
117+
#
118+
if [ ! -f "${STATUS_DIR}/doGenerateSC" ]; then
119+
echo "The doGenerateSC script status file ${STATUS_DIR}/doGenerateSC was not found so exiting" >&2
120+
exit 1
121+
elif [ ! -f "${STATUS_DIR}/doGenerateOnline" ]; then
122+
echo "The doGenerateOnline script status file ${STATUS_DIR}/doGenerateOnline was not found so exiting" >&2
123+
exit 1
124+
fi
125+
126+
#
127+
# Find WLST
128+
#
129+
WLST=
130+
if [ -f "${ORACLE_HOME}/oracle_common/common/bin/wlst.sh" ]; then
131+
WLST="${ORACLE_HOME}/oracle_common/common/bin/wlst.sh"
132+
WLST_EXT_CLASSPATH="${WLSDEPLOY_HOME}/lib/weblogic-deploy-core.jar:${TEST_HOME}/resources"; export WLST_EXT_CLASSPATH
133+
elif [ -f "${ORACLE_HOME}/wlserver_10.3/common/bin/wlst.sh" ]; then
134+
WLST="${ORACLE_HOME}/wlserver_10.3/common/bin/wlst.sh"
135+
elif [ -f "${ORACLE_HOME}/wlserver_12.1/common/bin/wlst.sh" ]; then
136+
WLST="${ORACLE_HOME}/wlserver_12.1/common/bin/wlst.sh"
137+
elif [ -f "${ORACLE_HOME}/wlserver/common/bin/wlst.sh" ] && [ -f "${ORACLE_HOME}/wlserver/.product.properties" ]; then
138+
WLST="${ORACLE_HOME}/wlserver/common/bin/wlst.sh"
139+
else
140+
echo "Unable to locate wlst.sh script in ORACLE_HOME ${ORACLE_HOME}" >&2
141+
exit 1
142+
fi
143+
144+
CLASSPATH="${WLSDEPLOY_HOME}/lib/weblogic-deploy-core.jar:${TEST_HOME}/resources"
145+
146+
LOG_CONFIG_CLASS=oracle.weblogic.deploy.logging.WLSDeployLoggingConfig
147+
WLST_PROPERTIES=-Dcom.oracle.cie.script.throwException=true
148+
WLST_PROPERTIES="-Djava.util.logging.config.class=${LOG_CONFIG_CLASS} ${WLST_PROPERTIES}"
149+
WLST_PROPERTIES="${WLST_PROPERTIES} ${WLSDEPLOY_PROPERTIES}"
150+
export WLST_PROPERTIES
151+
152+
if [ "${WLSDEPLOY_LOG_PROPERTIES}" = "" ]; then
153+
WLSDEPLOY_LOG_PROPERTIES=${WLSDEPLOY_HOME}/etc/logging.properties; export WLSDEPLOY_LOG_PROPERTIES
154+
fi
155+
156+
if [ "${WLSDEPLOY_LOG_DIRECTORY}" = "" ]; then
157+
WLSDEPLOY_LOG_DIRECTORY=${WLSDEPLOY_HOME}/logs; export WLSDEPLOY_LOG_DIRECTORY
158+
fi
159+
160+
echo "JAVA_HOME = ${JAVA_HOME}"
161+
echo "CLASSPATH = ${CLASSPATH}"
162+
echo "JAVA_PROPERTIES = ${JAVA_PROPERTIES}"
163+
164+
PY_SCRIPTS_PATH=${TEST_HOME}/python
165+
166+
echo "${WLST} ${PY_SCRIPTS_PATH}/generate_offline.py \
167+
-oracle_home ${ORACLE_HOME} \
168+
-domain_home ${DOMAIN_HOME} \
169+
-output_dir ${OUTPUT_DIR}"
170+
"${WLST}" "${PY_SCRIPTS_PATH}/generate_offline.py" \
171+
-oracle_home "${ORACLE_HOME}" \
172+
-domain_home "${DOMAIN_HOME}" \
173+
-output_dir "${OUTPUT_DIR}"
174+
175+
RETURN_CODE=$?
176+
if [ "${RETURN_CODE}" = "0" ]; then
177+
echo "doGenerateOffline.sh completed successfully"
178+
touch "${STATUS_DIR}/doGenerateOffline"
179+
else
180+
echo "doGenerateOffline.sh failed (exit code = ${RETURN_CODE})"
181+
fi
182+
exit ${RETURN_CODE}

0 commit comments

Comments
 (0)