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

Add a new upgrade test case #4141

Open
wants to merge 4 commits into
base: v3.x/staging
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions .github/scripts/cicd_test/make_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ case $install_test_choice in
test_file="$INSTALL_PTF_TWICE_TESTFILE"
;;

"Upgrade Zowe (3.0 to latest)")
test_file="$UPGRADE_ZOWE_TESTFILE"
;;

"VSAM Caching Storage Method")
test_file="$VSAM_CACHING_STORAGE_METHOD_TESTFILE"
;;
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cicd-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ on:
- Infinispan Caching Storage Method
- Config Manager
- Generate API Documentation
- Upgrade Zowe (3.0 to latest)
- Zowe Nightly Tests
- Zowe Release Tests
custom-zowe-artifactory-pattern-or-build-number:
Expand Down Expand Up @@ -85,6 +86,7 @@ env:
ZOS_NODE_V22_TESTFILE: extended/node-versions/node-v22.ts
NON_STRICT_VERIFY_EXTERNAL_CERTIFICATE_TESTFILE: extended/certificates/nonstrict-verify-external-certificate.ts
INSTALL_PTF_TWICE_TESTFILE: extended/install-ptf-two-times.ts
UPGRADE_ZOWE_TESTFILE: extended/install-base-then-upgrade.ts
VSAM_CACHING_STORAGE_METHOD_TESTFILE: extended/caching-storages/vsam-storage.ts
INFINISPAN_CACHING_STORAGE_METHOD_TESTFILE: extended/caching-storages/infinispan-storage.ts
CONFIG_MANAGER_TESTFILE: extended/config-manager/enable-config-manager.ts
Expand Down
1 change: 1 addition & 0 deletions playbooks/install-ptf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
# Configure Zowe ?
- import_role:
name: configure
when: zowe_ptf_configure|default(True)

# ============================================================================
# Customize for testing
Expand Down
1 change: 1 addition & 0 deletions tests/installation/src/__tests__/basic/install-ptf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe(testSuiteName, () => {
await installAndVerifySmpePtf(
testSuiteName,
process.env.TEST_SERVER,
{},
{
'zowe_build_local': process.env['ZOWE_BUILD_LOCAL'],
'zowe_custom_for_test': 'true',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe(testSuiteName, () => {
await installAndVerifySmpePtf(
testSuiteName,
testServer,
{},
{
'zowe_build_local': process.env['ZOWE_BUILD_LOCAL'],
'zowe_custom_for_test': 'true',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ describe(testSuiteName, () => {
await installAndVerifySmpePtf(
testSuiteName,
testServer,
{},
{
'zowe_build_local': process.env['ZOWE_BUILD_LOCAL'],
'zowe_custom_for_test': 'true',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe(testSuiteName, () => {
await installAndVerifySmpePtf(
testSuiteName,
testServer,
{},
{
'zowe_build_local': process.env['ZOWE_BUILD_LOCAL'],
'zowe_custom_for_test': 'true',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright IBM Corporation 2020
*/

import {
checkMandatoryEnvironmentVariables,
installAndVerifySmpePtf,
showZoweRuntimeLogs,
} from '../../../utils';
import { TEST_TIMEOUT_SMPE_FMID, TEST_TIMEOUT_SMPE_PTF } from '../../../constants';

const testSuiteName = 'Test 3.0 base install then upgrade (basic config)';
describe(testSuiteName, () => {
beforeAll(() => {
// validate variables
checkMandatoryEnvironmentVariables([
'TEST_SERVER',
'ZOWE_BUILD_LOCAL',
]);
});

test('install and verify', async () => {
await installAndVerifySmpePtf(
testSuiteName,
process.env.TEST_SERVER,
{
'skip_start': 'false',
},
{
'zowe_build_local': process.env['ZOWE_BUILD_LOCAL'],
'zowe_custom_for_test': 'true',
'zowe_ptf_configure': 'false',
'zowe_lock_keystore': 'false',
}
);
}, TEST_TIMEOUT_SMPE_FMID + TEST_TIMEOUT_SMPE_PTF); // long timeout since we start + test both


afterAll(async () => {
await showZoweRuntimeLogs(process.env.TEST_SERVER);
});

});
19 changes: 12 additions & 7 deletions tests/installation/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,20 +416,25 @@ export async function installAndVerifyExtension(testcase: string, serverId: stri
* @param {Object} extraFmidVars
* @param {Object} extraPtfVars
*/
export async function installAndVerifySmpePtf(testcase: string, serverId: string, extraPtfVars: {[key: string]: any} = {}): Promise<void> {
debug(`installAndVerifySmpePtf(${testcase}, ${serverId}, ${JSON.stringify(extraPtfVars)})`);
export async function installAndVerifySmpePtf(testcase: string, serverId: string, extraFmidVars: {[key: string]: any} = {}, extraPtfVars: {[key: string]: any} = {}): Promise<void> {
debug(`installAndVerifySmpePtf(${testcase}, ${serverId}, ${JSON.stringify(extraFmidVars)}, ${JSON.stringify(extraPtfVars)})`);

debug(`run install-fmid.yml on ${serverId}`);

const fmidVars = {
...{
'zowe_build_remote': ZOWE_FMID,
'skip_start': 'true',
...APIML_OIDC_VARS
},
...extraFmidVars,
}

const resultFmid = await runAnsiblePlaybook(
testcase,
'install-fmid.yml',
serverId,
{
'zowe_build_remote': ZOWE_FMID,
'skip_start': 'true',
...APIML_OIDC_VARS
}
fmidVars
);

expect(resultFmid.code).toBe(0);
Expand Down
Loading