Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

[next] Update moment dependency and use cli-test-utils #44

Merged
merged 15 commits into from
Apr 13, 2022
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ All notable changes to the IBM® IMS™ Plug-in for Zowe CLI will be documented

- Remove @zowe/cli peer dependency to better support NPM v7

## `2.0.4`

- BugFix: Updated `moment` dependency.

## `2.0.3`

- BugFix: Pruned dev dependencies from npm-shrinkwrap file.

## `2.0.2`

- BugFix: Included an npm-shrinkwrap file to lock-down all transitive dependencies.
Expand Down
10 changes: 4 additions & 6 deletions __tests__/__integration__/cli/imsprofile.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
* *
*/

import { TestEnvironment } from "../../__src__/environment/TestEnvironment";
import { ITestEnvironment } from "../../__src__/environment/doc/response/ITestEnvironment";
import { runCliScript } from "../../__src__/TestUtils";
import { TempTestProfiles } from "../../__src__/environment/TempTestProfiles";
import { ITestEnvironment, TestEnvironment, isStderrEmptyForProfilesCommand, runCliScript } from "@zowe/cli-test-utils";
import { ITestPropertiesSchema } from "../../__src__/doc/ITestPropertiesSchema";

let testEnvironment: ITestEnvironment;
let testEnvironment: ITestEnvironment<ITestPropertiesSchema>;
describe("Creating an IMS profile", () => {

beforeAll(async () => {
Expand All @@ -31,7 +29,7 @@ describe("Creating an IMS profile", () => {

it("should create an IMS profile successfully with fake connection details", () => {
const output = runCliScript(__dirname + "/__scripts__/create_ims_profile.sh", testEnvironment);
expect(TempTestProfiles.isStderrEmpty(output.stderr)).toBeTruthy();
expect(isStderrEmptyForProfilesCommand(output.stderr)).toBeTruthy();
expect(output.status).toEqual(0);
expect(output.stdout.toString()).toContain("success");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports[`ims query program should display the query program help 1`] = `
OPTIONS
-------

--attributes | --att (array)
--attributes | --att (array)

Specifies the application program output fields to return.

Expand All @@ -37,57 +37,57 @@ exports[`ims query program should display the query program help 1`] = `
LANG, LOCAL, MODEL, RESIDENT, SCHDTYPE, STATUS, TIMESTAMP, TRANSTAT,
EXPORTNEEDED, DB, RTC, TRAN, WORK

--status | --st (array)
--status | --st (array)

Selects programs for display that possess at least one of the specified program
statuses.

Allowed values: DB-NOTAVL, IOPREV, LOCK, NOTINIT, STOSCHD, TRACE

--route | --rt (array)
--route | --rt (array)

Specifies the routes to return.

IMS CONNECTION OPTIONS
----------------------

--host | -H (string)
--host | -H (string)

The IMS Operations API server host name.

--port | -P (number)
--port | -P (number)

The IMS Operations API server port.

--ims-connect-host | --ich (string)
--ims-connect-host | --ich (string)

The hostname of your instance of IMS Connect. This is typically the hostname of
the mainframe LPAR where IMS Connect is running.

--ims-connect-port | --icp (number)
--ims-connect-port | --icp (number)

The port of your instance of IMS Connect. This port can be found in your IMS
Connect configuration file on the mainframe.

--plex | -x (string)
--plex | -x (string)

The name of the IMS plex.

--user | -u (string)
--user | -u (string)

The web server user name where the IMS Operations API resides.

--password | --pass (string)
--password | --pass (string)

The web server user password where the IMS Operations API resides.

--base-path | --bp (string)
--base-path | --bp (string)

The base path for your API mediation layer instance. Specify this option to
prepend the base path to all z/OSMF resources when making REST requests. Do not
specify this option if you are not using an API mediation layer.

--protocol (string)
--protocol (string)

Specifies protocol (http or https).

Expand All @@ -97,52 +97,52 @@ exports[`ims query program should display the query program help 1`] = `
PROFILE OPTIONS
---------------

--ims-profile | --ims-p (string)
--ims-profile | --ims-p (string)

The name of a (ims) profile to load for this command execution.

--base-profile | --base-p (string)
--base-profile | --base-p (string)

The name of a (base) profile to load for this command execution.

BASE CONNECTION OPTIONS
-----------------------

--reject-unauthorized | --ru (boolean)
--reject-unauthorized | --ru (boolean)

Reject self-signed certificates.

Default value: true

--token-type | --tt (string)
--token-type | --tt (string)

The type of token to get and use for the API. Omit this option to use the
default token type, which is provided by 'zowe auth login'.

--token-value | --tv (string)
--token-value | --tv (string)

The value of the token to pass to the API.

--cert-file (local file path)
--cert-file (local file path)

The file path to a certificate file to use for authentication

--cert-key-file (local file path)
--cert-key-file (local file path)

The file path to a certificate key file to use for authentication

RESPONSE FORMAT OPTIONS
-----------------------

--response-format-filter | --rff (array)
--response-format-filter | --rff (array)

Filter (include) fields in the response. Accepts an array of field/property
names to include in the output response. You can filter JSON objects properties
OR table columns/fields. In addition, you can use this option in conjunction
with '--response-format-type' to reduce the output of a command to a single
field/property or a list of a single field/property.

--response-format-type | --rft (string)
--response-format-type | --rft (string)

The command response output format type. Must be one of the following:

Expand All @@ -162,27 +162,27 @@ exports[`ims query program should display the query program help 1`] = `

Allowed values: table, list, object, string

--response-format-header | --rfh (boolean)
--response-format-header | --rfh (boolean)

If \\"--response-format-type table\\" is specified, include the column headers in
the output.

GLOBAL OPTIONS
--------------

--response-format-json | --rfj (boolean)
--response-format-json | --rfj (boolean)

Produce JSON formatted data from a command

--help | -h (boolean)
--help | -h (boolean)

Display help text

--help-examples (boolean)
--help-examples (boolean)

Display examples for all the commands in a group

--help-web | --hw (boolean)
--help-web | --hw (boolean)

Display HTML help in browser

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
*/

// Test environment will be populated in the "beforeAll"
import { ITestEnvironment } from "../../../../__src__/environment/doc/response/ITestEnvironment";
import { TestEnvironment } from "../../../../__src__/environment/TestEnvironment";
import { runCliScript } from "../../../../__src__/TestUtils";
import { ITestEnvironment, TestEnvironment, runCliScript } from "@zowe/cli-test-utils";
import { ITestPropertiesSchema } from "../../../../__src__/doc/ITestPropertiesSchema";

let TEST_ENVIRONMENT: ITestEnvironment;
let TEST_ENVIRONMENT: ITestEnvironment<ITestPropertiesSchema>;
describe("ims query program", () => {

// Create the unique test environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,63 +21,63 @@ exports[`ims query region should display the query region help 1`] = `
OPTIONS
-------

--dc (boolean)
--dc (boolean)

Displays only the DC subset of the output

Default value: true

--region (boolean)
--region (boolean)

Displays only the REGION subset of the output. The display consists of active
regions

Default value: true

--route | --rt (array)
--route | --rt (array)

Specifies the routes to return.

IMS CONNECTION OPTIONS
----------------------

--host | -H (string)
--host | -H (string)

The IMS Operations API server host name.

--port | -P (number)
--port | -P (number)

The IMS Operations API server port.

--ims-connect-host | --ich (string)
--ims-connect-host | --ich (string)

The hostname of your instance of IMS Connect. This is typically the hostname of
the mainframe LPAR where IMS Connect is running.

--ims-connect-port | --icp (number)
--ims-connect-port | --icp (number)

The port of your instance of IMS Connect. This port can be found in your IMS
Connect configuration file on the mainframe.

--plex | -x (string)
--plex | -x (string)

The name of the IMS plex.

--user | -u (string)
--user | -u (string)

The web server user name where the IMS Operations API resides.

--password | --pass (string)
--password | --pass (string)

The web server user password where the IMS Operations API resides.

--base-path | --bp (string)
--base-path | --bp (string)

The base path for your API mediation layer instance. Specify this option to
prepend the base path to all z/OSMF resources when making REST requests. Do not
specify this option if you are not using an API mediation layer.

--protocol (string)
--protocol (string)

Specifies protocol (http or https).

Expand All @@ -87,52 +87,52 @@ exports[`ims query region should display the query region help 1`] = `
PROFILE OPTIONS
---------------

--ims-profile | --ims-p (string)
--ims-profile | --ims-p (string)

The name of a (ims) profile to load for this command execution.

--base-profile | --base-p (string)
--base-profile | --base-p (string)

The name of a (base) profile to load for this command execution.

BASE CONNECTION OPTIONS
-----------------------

--reject-unauthorized | --ru (boolean)
--reject-unauthorized | --ru (boolean)

Reject self-signed certificates.

Default value: true

--token-type | --tt (string)
--token-type | --tt (string)

The type of token to get and use for the API. Omit this option to use the
default token type, which is provided by 'zowe auth login'.

--token-value | --tv (string)
--token-value | --tv (string)

The value of the token to pass to the API.

--cert-file (local file path)
--cert-file (local file path)

The file path to a certificate file to use for authentication

--cert-key-file (local file path)
--cert-key-file (local file path)

The file path to a certificate key file to use for authentication

RESPONSE FORMAT OPTIONS
-----------------------

--response-format-filter | --rff (array)
--response-format-filter | --rff (array)

Filter (include) fields in the response. Accepts an array of field/property
names to include in the output response. You can filter JSON objects properties
OR table columns/fields. In addition, you can use this option in conjunction
with '--response-format-type' to reduce the output of a command to a single
field/property or a list of a single field/property.

--response-format-type | --rft (string)
--response-format-type | --rft (string)

The command response output format type. Must be one of the following:

Expand All @@ -152,27 +152,27 @@ exports[`ims query region should display the query region help 1`] = `

Allowed values: table, list, object, string

--response-format-header | --rfh (boolean)
--response-format-header | --rfh (boolean)

If \\"--response-format-type table\\" is specified, include the column headers in
the output.

GLOBAL OPTIONS
--------------

--response-format-json | --rfj (boolean)
--response-format-json | --rfj (boolean)

Produce JSON formatted data from a command

--help | -h (boolean)
--help | -h (boolean)

Display help text

--help-examples (boolean)
--help-examples (boolean)

Display examples for all the commands in a group

--help-web | --hw (boolean)
--help-web | --hw (boolean)

Display HTML help in browser

Expand Down
Loading