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 4 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
30 changes: 0 additions & 30 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 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

- BugFix: Added missing z/OSMF connection options to the z/OS Logs command group.

## `7.18.9`

- Enhancement: Incorporate all source code from the zowe/imperative Github repository into the zowe/zowe-cli repository. This change should have no user impact.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@ describe("Compare Data Sets", () => {
});
defaultSystem = testEnvironment.systemTestProperties;

REAL_SESSION = new Session({
user: defaultSystem.zosmf.user,
password: defaultSystem.zosmf.password,
hostname: defaultSystem.zosmf.host,
port: defaultSystem.zosmf.port,
type: "basic",
rejectUnauthorized: defaultSystem.zosmf.rejectUnauthorized
});
REAL_SESSION = TestEnvironment.createZosmfSession(testEnvironment);

dsname = getUniqueDatasetName(defaultSystem.zosmf.user);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@ describe("View Data Set", () => {
});
defaultSystem = testEnvironment.systemTestProperties;

REAL_SESSION = new Session({
user: defaultSystem.zosmf.user,
password: defaultSystem.zosmf.password,
hostname: defaultSystem.zosmf.host,
port: defaultSystem.zosmf.port,
type: "basic",
rejectUnauthorized: defaultSystem.zosmf.rejectUnauthorized
});
REAL_SESSION = TestEnvironment.createZosmfSession(testEnvironment);

dsname = getUniqueDatasetName(defaultSystem.zosmf.user);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@ describe("View uss file", () => {
});
defaultSystem = testEnvironment.systemTestProperties;

REAL_SESSION = new Session({
user: defaultSystem.zosmf.user,
password: defaultSystem.zosmf.password,
hostname: defaultSystem.zosmf.host,
port: defaultSystem.zosmf.port,
type: "basic",
rejectUnauthorized: defaultSystem.zosmf.rejectUnauthorized
});
REAL_SESSION = TestEnvironment.createZosmfSession(testEnvironment);

dsname = getUniqueDatasetName(defaultSystem.zosmf.user);
// using unique DS function to generate unique USS file name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ import * as fs from "fs";
// Test Environment populated in the beforeAll();
let TEST_ENVIRONMENT: ITestEnvironment<ITestPropertiesSchema>;

// Expected length constants
const FOLLOW_UP_ATTEMPTS: number = 3;

describe("zos-logs list logs", () => {
// Create the unique test environment with zosmf profiles
beforeAll(async () => {
Expand Down
13 changes: 12 additions & 1 deletion packages/cli/src/zoslogs/ZosLogs.definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

import { ICommandDefinition } from "@zowe/imperative";
import { ZosmfSession } from "@zowe/zosmf-for-zowe-sdk";
import { ListDefinition } from "./list/List.definition";

export const definition: ICommandDefinition = {
Expand All @@ -18,7 +19,17 @@ export const definition: ICommandDefinition = {
type: "group",
summary: "Interact with z/OS logs",
description: "Interact with z/OS logs.",
children: [ListDefinition]
children: [ListDefinition],
passOn: [
{
property: "options",
value: ZosmfSession.ZOSMF_CONNECTION_OPTIONS,
merge: true,
ignoreNodes: [
{type: "group"}
]
}
]
};

module.exports = definition;
18 changes: 2 additions & 16 deletions packages/zosjobs/__tests__/__system__/CancelJobs.system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,7 @@ describe("CancelJobs System tests", () => {
});
systemProps = testEnvironment.systemTestProperties;

REAL_SESSION = new Session({
user: systemProps.zosmf.user,
password: systemProps.zosmf.password,
hostname: systemProps.zosmf.host,
port: systemProps.zosmf.port,
type: "basic",
rejectUnauthorized: systemProps.zosmf.rejectUnauthorized
});
REAL_SESSION = TestEnvironment.createZosmfSession(testEnvironment);

const ACCOUNT = systemProps.tso.account;
const maxStepNum = 6; // Use lots of steps to make the job stay in INPUT status longer
Expand Down Expand Up @@ -187,14 +180,7 @@ describe("CancelJobs System tests - encoded", () => {
});
systemProps = testEnvironment.systemTestProperties;

REAL_SESSION = new Session({
user: systemProps.zosmf.user,
password: systemProps.zosmf.password,
hostname: systemProps.zosmf.host,
port: systemProps.zosmf.port,
type: "basic",
rejectUnauthorized: systemProps.zosmf.rejectUnauthorized
});
REAL_SESSION = TestEnvironment.createZosmfSession(testEnvironment);

const ACCOUNT = systemProps.tso.account;
const maxStepNum = 6; // Use lots of steps to make the job stay in INPUT status longer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe("Download Jobs - System tests", () => {

ACCOUNT = defaultSystem.tso.account;
const JOB_LENGTH = 6;
DOWNLOAD_JOB_NAME = REAL_SESSION.ISession.user.substr(0, JOB_LENGTH).toUpperCase() + "DJ";
DOWNLOAD_JOB_NAME = REAL_SESSION.ISession.user?.substr(0, JOB_LENGTH).toUpperCase() + "DJ";
JOBCLASS = testEnvironment.systemTestProperties.zosjobs.jobclass;
SYSAFF = testEnvironment.systemTestProperties.zosjobs.sysaff;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ describe("Get Jobs - System Tests", () => {
password: "fake",
hostname: defaultSystem.zosmf.host,
port: defaultSystem.zosmf.port,
basePath: defaultSystem.zosmf.basePath,
type: "basic",
rejectUnauthorized: false
});
Expand Down
Loading