Skip to content

Commit

Permalink
Merge pull request #2228 from zowe/update-next-with-master
Browse files Browse the repository at this point in the history
Update Next with Master Changes
  • Loading branch information
awharn committed Aug 13, 2024
2 parents 61fb475 + 72668a1 commit 55204b0
Show file tree
Hide file tree
Showing 42 changed files with 317 additions and 165 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,113 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Imperative Secure Tests imperative-test-cli config profiles should list profiles 1`] = `
exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config import failure scenarios should fail to import if location is not specified 1`] = `
"
Syntax Error:
Missing Positional Argument: location
Argument Description: File path or URL to import from.
Example:
- Import config from local file on disk:
$ imperative-test-cli config import ~/Downloads/zowe.config.json
Use \\"imperative-test-cli config import --help\\" to view command description, usage, and options.
"
`;

exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the configuration 1`] = `
"profiles:
secured:
type: secured
properties:
info:
secure:
(empty array)
project_base:
type: base
properties:
secure:
- secret
global_base:
type: base
properties:
secure:
- secret
defaults:
secured: secured
base: project_base
autoStore: true
"
`;

exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the configuration without showing secure values 1`] = `
"profiles:
secured:
type: secured
properties:
info:
secure:
(empty array)
project_base:
type: base
properties:
secret: (secure value)
secure:
- secret
global_base:
type: base
properties:
secure:
- secret
defaults:
secured: secured
base: project_base
autoStore: true
"
`;

exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the defaults configuration property 1`] = `
"secured: secured
base: project_base
"
`;

exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the profiles configuration property 1`] = `
"secured:
type: secured
properties:
info:
secure:
(empty array)
project_base:
type: base
properties:
secure:
- secret
global_base:
type: base
properties:
secure:
- secret
"
`;

exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the root level property names only 1 1`] = `
"profiles
defaults
autoStore
"
`;

exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the root level property names only 2 1`] = `
"profiles
defaults
autoStore
"
`;

exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config profiles should list profiles 1`] = `
"secured
project_base
global_base
Expand Down
17 changes: 5 additions & 12 deletions __tests__/__integration__/imperative.secure.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@

// 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
// All tests that mess with the keyring must go here - the MacOS Keyring is NOT thread safe, and cannot run anything in parallel
/* eslint-disable max-len */

describe("Imperative Secure Tests", () => {
require("./../../packages/imperative/__tests__/src/packages/imperative/__integration__/ConfigLoading.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/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");
require("./../../packages/imperative/__tests__/src/packages/imperative/__integration__/ConfigLoading.integration.subtest");
require("./../../packages/imperative/__tests__/src/packages/imperative/__integration__/PluginManagementFacility.integration.subtest");
require("../../packages/imperative/__tests__/__integration__/imperative/__tests__/__integration__/cli/cli.imperative-test-cli.integration.subtest");
require("../../packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/auth/Cmd.cli.auth.fruit.integration.subtest");
});


8 changes: 8 additions & 0 deletions __tests__/__packages__/cli-test-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Zowe CLI test utils package will be documented in this file.

## Recent Changes

- Update: See `7.28.3` for details

## `8.0.0-next.202407262216`

- Update: See `7.28.2` for details
Expand All @@ -18,6 +22,10 @@ All notable changes to the Zowe CLI test utils package will be documented in thi

- Major: First major version bump for V3

## `7.28.3`

- BugFix: Refactored code to reduce the use of deprecated functions to prepare for upcoming Node.js 22 support. [#2191](https://github.com/zowe/zowe-cli/issues/2191)

## `7.28.2`

- BugFix: Improved the error message shown on Windows when `runCliScript` method cannot find `sh` executable on PATH. [#2208](https://github.com/zowe/zowe-cli/issues/2208)
Expand Down
1 change: 1 addition & 0 deletions __tests__/__packages__/cli-test-utils/src/TestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export function mockHandlerParameters(params: PartialHandlerParameters): IHandle
...params.arguments || {}
},
positionals: params.positionals || [],
// eslint-disable-next-line deprecation/deprecation
profiles: params.profiles || new CommandProfiles(new Map()),
definition: params.definition,
fullDefinition: params.definition,
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Zowe CLI package will be documented in this file.

## Recent Changes

- Update: See `7.28.3` for details

## `8.0.0-next.202407181904`

- Enhancement: The 'zowe config auto-init' command now generates a base profile name of 'global_base' or 'project_base', depending on whether a global or project configuration file is being generated. Related to Zowe Explorer issue https://github.com/zowe/zowe-explorer-vscode/issues/2682.
Expand Down Expand Up @@ -143,6 +147,10 @@ LTS Breaking: Removed the following previously deprecated items: [#1981](https:/

- Major: First major version bump for V3

## `7.28.3`

- BugFix: Refactored code to reduce the use of deprecated functions to prepare for upcoming Node.js 22 support. [#2191](https://github.com/zowe/zowe-cli/issues/2191)

## `7.25.1`

- BugFix: Updated `braces` dependency for technical currency. [#2157](https://github.com/zowe/zowe-cli/pull/2157)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class ActionHandler extends ZosmfBaseHandler {
commandParameters.arguments.name
);
const instances: IProvisionedInstance[] = registry["scr-list"];
if (instances== null) {
if (instances == null) {
commandParameters.response.console.error(
"No instance with name " +
commandParameters.arguments.name +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class Handler extends ZosmfBaseHandler {
let usedOptionalParms: boolean = false;
let arrayOfSystemNickNames: string[];

if (!(commandParameters.arguments.systemNickNames== null)) {
if (commandParameters.arguments.systemNickNames != null) {
arrayOfSystemNickNames = commandParameters.arguments.systemNickNames
.split(",")
.map((systemName: string) => {
Expand All @@ -46,13 +46,7 @@ export default class Handler extends ZosmfBaseHandler {
);

for (const property in provisionOptionalParams) {
if (
!(
provisionOptionalParams[
property as keyof IProvisionOptionals
] == null
)
) {
if ( provisionOptionalParams[property as keyof IProvisionOptionals] != null ) {
usedOptionalParms = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class Handler extends ZosmfBaseHandler {
responseKey: response.lastResponseKey,
cmdResponseUrl: response.cmdResponseUrl || undefined,
keywordDetected: response.keywordDetected ||
(!(commandParameters.arguments["solicited-keyword"] == null) ? false : undefined)
(commandParameters.arguments["solicited-keyword"] != null ? false : undefined)
};
commandParameters.response.console.log("Additional details:");
commandParameters.response.console.log("-------------------");
Expand Down
9 changes: 9 additions & 0 deletions packages/imperative/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Imperative package will be documented in this file.

## Recent Changes

- Update: See `5.26.2` for details

## `8.0.0-next.202408092029`

- BugFix: Resolved bug that resulted in user not being prompted for a key passphrase if it is located in the secure credential array of the ssh profile. [#1770](https://github.com/zowe/zowe-cli/issues/1770)
Expand Down Expand Up @@ -430,6 +434,11 @@ All notable changes to the Imperative package will be documented in this file.

- Major: First major version bump for V3

## `5.26.2`

- BugFix: Refactored code to reduce the use of deprecated functions to prepare for upcoming Node.js 22 support. [#2191](https://github.com/zowe/zowe-cli/issues/2191)
- BugFix: Fixed error in REST client when making requests with session type of `SessConstants.AUTH_TYPE_NONE`. [#2219](https://github.com/zowe/zowe-cli/issues/2219)

## `5.26.1`

- BugFix: Fixed missing export for `Proxy` class in Imperative package. [#2205](https://github.com/zowe/zowe-cli/pull/2205)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@
*
*/

require("./Cmd.cli.auth.login.fruit.integration.subtest");
require("./Cmd.cli.auth.logout.fruit.integration.subtest");
describe("Cmd CLI Secure Tests", () => {
require("./Cmd.cli.auth.login.fruit.integration.subtest");
require("./Cmd.cli.auth.logout.fruit.integration.subtest");
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ICommandHandler, IHandlerParameters } from "../../../../../../../lib";

export default class ProfileSpecHandler implements ICommandHandler {
public async process(params: IHandlerParameters): Promise<void> {
// eslint-disable-next-line deprecation/deprecation
params.profiles.get("blah");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { IHandlerParameters, ICommandHandler, TextUtils } from "../../../../../.

export default class FirstGroupCommandOneHandler implements ICommandHandler {
public async process(params: IHandlerParameters): Promise<void> {
// eslint-disable-next-line deprecation/deprecation
const prof = params.profiles.get("insecure");
params.response.console.log(TextUtils.prettyJson(prof));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* 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 Test CLI Secure Tests", () => {
// require("./auth/imperative.test.cli.auth.login.fruit.integration.subtest");
// require("./auth/imperative.test.cli.auth.logout.fruit.integration.subtest");
require("./config/auto-init/imperative.test.cli.config.auto-init.fruit.integration.subtest");
require("./config/convert-profiles/cli.imperative-test-cli.config.convert-profiles.integration.subtest");
require("./config/edit/cli.imperative-test-cli.config.edit.integration.subtest");
require("./config/import/cli.imperative-test-cli.config.import.integration.subtest");
require("./config/init/cli.imperative-test-cli.config.init.integration.subtest");
require("./config/list/cli.imperative-test-cli.config.list.integration.subtest");
require("./config/profiles/cli.imperative-test-cli.config.profiles.integration.subtest");
require("./config/secure/cli.imperative-test-cli.config.secure.integration.subtest");
require("./config/set/cli.imperative-test-cli.config.set.integration.subtest");
require("./test/cli.imperative-test-cli.test.config-auto-store.integration.subtest");
require("./test/cli.imperative-test-cli.test.config-override.integration.subtest");
});

This file was deleted.

Loading

0 comments on commit 55204b0

Please sign in to comment.