Skip to content
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

Improve PTF test speed #3847

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions playbooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ $ ansible-playbook -l <server> show-logs.yml -v
- **zowe_auto_create_user_group**: A boolean value to enable or disable creating Zowe user and group. Default value is `false`.
- **zowe_configure_security_dry_run**: A boolean value to skip running security configurations when configure Zowe instance.
- **zos_keystore_mode**: An optional string to configure Zowe instance to store certificates into Keyring instead of keystore. Valid values are `<empty>` (default value) or `KEYSTORE_MODE_KEYRING`.
- **skip_configfmid**: A boolean value to skip configuration of Zowe after FMID installation. Default value is `false`.
- **skip_start**: A boolean value to skip automatically starting Zowe after installation. Default value is `false`.
- **zowe_uninstall_before_install**: If you want to uninstall Zowe before installing a new version. Default value is `true`.
- **zowe_custom_for_test**: If you want to customize the Zowe instance to run sanity test from zowe-install-packaging.
Expand Down
1 change: 1 addition & 0 deletions playbooks/install-fmid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
# Configure Zowe
- import_role:
name: configfmid
when: not skip_configfmid|default(False)

# ============================================================================
# Customize for testing
Expand Down
1 change: 1 addition & 0 deletions tests/installation/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
*
* @param {Any} obj any object
*/
export function calculateHash(obj: any): string {

Check warning on line 53 in tests/installation/src/utils.ts

View workflow job for this annotation

GitHub Actions / cicd-test (basic/install.ts, marist-zzow07)

Unexpected any. Specify a different type
return crypto.createHash('md5').update(util.format('%j', obj)).digest('hex');
}

Expand Down Expand Up @@ -87,7 +87,7 @@
* @param {Object} extraVars Object
* @param {String} serverId String
*/
export function importDefaultExtraVars(extraVars: {[key: string]: any}, serverId: string): void {

Check warning on line 90 in tests/installation/src/utils.ts

View workflow job for this annotation

GitHub Actions / cicd-test (basic/install.ts, marist-zzow07)

Unexpected any. Specify a different type
const defaultMapping: {[key: string]: string[]} = {
'ansible_ssh_host' : ['SSH_HOST'],
'ansible_port' : ['SSH_PORT'],
Expand Down Expand Up @@ -128,7 +128,7 @@
* @param {Object} extraVars
* @param {String} verbose
*/
export function runAnsiblePlaybook(testcase: string, playbook: string, serverId: string, extraVars: {[key: string]: any} = {}, verbose = '-v'): Promise<PlaybookResponse> {

Check warning on line 131 in tests/installation/src/utils.ts

View workflow job for this annotation

GitHub Actions / cicd-test (basic/install.ts, marist-zzow07)

Unexpected any. Specify a different type
return new Promise((resolve, reject) => {
const result: PlaybookResponse = {
reportHash: calculateHash(testcase),
Expand Down Expand Up @@ -175,7 +175,7 @@
});
}

async function verifyZowe(testcase: string, serverId: string, extraVars: {[key: string]: any} = {}): Promise<PlaybookResponse> {

Check warning on line 178 in tests/installation/src/utils.ts

View workflow job for this annotation

GitHub Actions / cicd-test (basic/install.ts, marist-zzow07)

Unexpected any. Specify a different type
debug(`run verify.yml on ${serverId}`);
let resultVerify;

Expand All @@ -202,7 +202,7 @@
* @param {String} serverId
* @param {Object} extraVars
*/
async function installAndVerifyZowe(testcase: string, installPlaybook: string, serverId: string, extraVars: {[key: string]: any} = {}): Promise<void> {

Check warning on line 205 in tests/installation/src/utils.ts

View workflow job for this annotation

GitHub Actions / cicd-test (basic/install.ts, marist-zzow07)

Unexpected any. Specify a different type
debug(`installAndVerifyZowe(${testcase}, ${installPlaybook}, ${serverId}, ${JSON.stringify(extraVars)})`);

debug(`run ${installPlaybook} on ${serverId}`);
Expand Down Expand Up @@ -236,7 +236,7 @@
}
}

async function installExtension(testcase: string, serverId: string, extraVars: {[key: string]: any} = {}): Promise<void> {

Check warning on line 239 in tests/installation/src/utils.ts

View workflow job for this annotation

GitHub Actions / cicd-test (basic/install.ts, marist-zzow07)

Unexpected any. Specify a different type
debug(`run install-ext.yml on ${serverId}`);
const resultInstall = await runAnsiblePlaybook(
testcase,
Expand Down Expand Up @@ -290,7 +290,7 @@

}

async function verifyExtension(testcase: string, serverId: string, extraVars: {[key: string]: any} = {}): Promise<PlaybookResponse> {

Check warning on line 293 in tests/installation/src/utils.ts

View workflow job for this annotation

GitHub Actions / cicd-test (basic/install.ts, marist-zzow07)

'verifyExtension' is defined but never used

Check warning on line 293 in tests/installation/src/utils.ts

View workflow job for this annotation

GitHub Actions / cicd-test (basic/install.ts, marist-zzow07)

Unexpected any. Specify a different type
debug(`run verify-ext.yml on ${serverId}`);
// FIXME: how to verify in v2?
let resultVerify;
Expand All @@ -317,7 +317,7 @@
* @param {String} serverId
* @param {Object} extraVars
*/
export async function installAndVerifyConvenienceBuild(testcase: string, serverId: string, extraVars: {[key: string]: any} = {}): Promise<void> {

Check warning on line 320 in tests/installation/src/utils.ts

View workflow job for this annotation

GitHub Actions / cicd-test (basic/install.ts, marist-zzow07)

Unexpected any. Specify a different type
await installAndVerifyZowe(testcase, 'install.yml', serverId, extraVars);
}

Expand Down Expand Up @@ -415,6 +415,7 @@
serverId,
{
'zowe_build_remote': ZOWE_FMID,
'skip_configfmid': 'true',
'skip_start': 'true',
...APIML_OIDC_VARS
}
Expand Down
Loading