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

Fix System Tests to Handle Running Against APIML #1842

Merged
merged 19 commits into from
Nov 9, 2023
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/zowe-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ jobs:
if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }}
uses: t1m0thyj/unlock-keyring@v1

- name: Start Daemon on Windows only
- name: Start Daemon
id: start-daemon
if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'windows-latest' && (github.event.inputs.test-type == 'binary' || github.event_name == 'push') }}
if: ${{ always() && steps.build.outcome == 'success' && (github.event.inputs.test-type == 'binary' || github.event_name == 'push') }}
run: ./__tests__/__resources__/daemon_instances/zowe

- name: Integration Tests (Native)
Expand All @@ -133,7 +133,7 @@ jobs:

- name: Integration Tests (Daemon)
if: ${{ always() && steps.build.outcome == 'success' && (github.event.inputs.test-type == 'binary' || github.event_name == 'push') }}
run: npm run test:integration:inband
run: npm run test:integration -- --runInBand

- name: Archive Results
if: ${{ always() && steps.build.outcome == 'success' }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,5 @@ target/
# Browserified bundles and compiled JS for web help
packages/imperative/web-help/dist/css/bundle*
packages/imperative/web-help/dist/js/

jest-stare/
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Cli Profile Manager Default Credential Management Generic Failure Scenarios should fail if the Credential Manager is unable to retrieve a password 1`] = `
exports[`Imperative Secure Tests Cli Profile Manager Default Credential Management Generic Failure Scenarios should fail if the Credential Manager is unable to retrieve a password 1`] = `
"Command Preparation Failed:
Unable to load the secure field \\"username\\" associated with the profile \\"profile-name-changed\\" of type \\"username-password\\".
Error Details:
Expand All @@ -19,23 +19,29 @@ Resolutions:
"
`;

exports[`Cli Profile Manager Default Credential Management Generic Failure Scenarios should fail if the Credential Manager is unable to retrieve a password 2`] = `
exports[`Imperative Secure Tests Cli Profile Manager Default Credential Management Generic Failure Scenarios should fail if the Credential Manager is unable to retrieve a password 2`] = `
"Your default profile named profile-name of type username-password was successfully deleted.
Because you deleted it, the default profile for type username-password has been cleared.
To set a new default profile, run \\"zowe profiles set-default username-password <profileName>\\".
"
`;

exports[`Cli Profile Manager Default Credential Management Generic Success Scenarios should update a password 1`] = `
exports[`Imperative Secure Tests Cli Profile Manager Default Credential Management Generic Success Scenarios should update a password 1`] = `
"
Warning: The command 'profiles update' is deprecated.
Recommended replacement: The 'config set' command
"
`;

exports[`Cli Profile Manager Default Credential Management Generic Success Scenarios should update a password 2`] = `
exports[`Imperative Secure Tests Cli Profile Manager Default Credential Management Generic Success Scenarios should update a password 2`] = `
"Your default profile named profile-name of type username-password was successfully deleted.
Because you deleted it, the default profile for type username-password has been cleared.
To set a new default profile, run \\"zowe profiles set-default username-password <profileName>\\".
"
`;

exports[`Imperative Secure Tests imperative-test-cli config profiles should list profiles 1`] = `
"secured
base
"
`;
31 changes: 31 additions & 0 deletions __tests__/__integration__/imperative.secure.integration.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* 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 Contributors to the Zowe Project.
*
*/

// These tests require access to the same values on the keyring, therefore they cannot run in parallel
// The test order is important - some tests depend on other tests not running first - do not change it
/* eslint-disable max-len */

describe("Imperative Secure Tests", () => {
require("./imperative.integration.subtest");
require("./../../packages/imperative/__tests__/src/packages/profiles/__integration__/CliProfileManager.credentials.integration.subtest");
require("./../../packages/imperative/__tests__/src/packages/imperative/__integration__/PluginManagementFacility.integration.subtest");
require("./../../packages/imperative/__tests__/__integration__/imperative/__tests__/__integration__/cli/config/init/cli.imperative-test-cli.config.init.integration.subtest");
require("./../../packages/imperative/__tests__/__integration__/imperative/__tests__/__integration__/cli/config/auto-init/imperative.test.cli.config.auto-init.fruit.integration.subtest");
require("./../../packages/imperative/__tests__/__integration__/imperative/__tests__/__integration__/cli/config/convert-profiles/cli.imperative-test-cli.config.convert-profiles.integration.subtest");
require("./../../packages/imperative/__tests__/__integration__/imperative/__tests__/__integration__/cli/config/profiles/cli.imperative-test-cli.config.profiles.integration.subtest");
require("./../../packages/imperative/__tests__/__integration__/imperative/__tests__/__integration__/cli/config/secure/cli.imperative-test-cli.config.secure.integration.subtest");
require("./../../packages/imperative/__tests__/__integration__/imperative/__tests__/__integration__/cli/config/set/cli.imperative-test-cli.config.set.integration.subtest");
require("./../../packages/imperative/__tests__/__integration__/imperative/__tests__/__integration__/cli/profiles/cli.imperative-test-cli.profiles.create.secured-profile.integration.subtest");
require("./../../packages/imperative/__tests__/__integration__/imperative/__tests__/__integration__/cli/test/cli.imperative-test-cli.test.config-auto-store.integration.subtest");
require("./../../packages/imperative/__tests__/__integration__/imperative/__tests__/__integration__/cli/test/cli.imperative-test-cli.test.config-override.integration.subtest");
});


11 changes: 0 additions & 11 deletions __tests__/__resources__/env/integration-imperative.env

This file was deleted.

11 changes: 0 additions & 11 deletions __tests__/__resources__/env/integration-main.env

This file was deleted.

4 changes: 1 addition & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ module.exports = {
"reportTestSuiteErrors": true
}],
["jest-stare", {
"resultDir": "__tests__/__results__/jest-stare",
"coverageLink": "../unit/coverage/lcov-report/index.html"
}],
["github-actions", { "silent": false } ]
Expand All @@ -145,8 +144,7 @@ module.exports = {
"collectCoverageFrom": [
"packages/**/*.ts",
"!**/packages/imperative/web-help/**/*.ts",
"!**/packages/**/__tests__/**/*.ts",
"__tests__/__packages__/*.ts",
"!**/__tests__/**/*.ts",
"!**/node_modules/**",
"!**/lib/**"
],
Expand Down
Loading