Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
Signed-off-by: ATorrise <[email protected]>
  • Loading branch information
ATorrise committed Aug 27, 2024
1 parent 0b475ac commit 3853c8a
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions __tests__/__packages__/cli-test-utils/src/TestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { spawnSync, SpawnSyncReturns, ExecFileException } from "child_process";
import { ITestEnvironment } from "./environment/doc/response/ITestEnvironment";
import { AbstractSession, CommandProfiles, ICommandDefinition, IHandlerParameters, IO } from "@zowe/imperative";
import { DeleteJobs, ICommonJobParms, IDeleteJobParms, IJob } from "@zowe/zos-jobs-for-zowe-sdk";
import { Delete } from "@zowe/zos-files-for-zowe-sdk"
import { Delete } from "@zowe/zos-files-for-zowe-sdk";
import { posix } from "path";

/**
Expand All @@ -40,7 +40,7 @@ export function deleteLocalFile(filePath: string): void {
* @param {string} fileName - The name of the USS file
*/
export function deleteFiles(session: AbstractSession, fileName: string): void {
Delete.ussFile(session, fileName)
Delete.ussFile(session, fileName);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import * as fs from "fs";
import * as nodePath from "path";
import * as yaml from "js-yaml";
import { v4 as uuidv4 } from "uuid";
import { AbstractSession, ImperativeError, ImperativeExpect, IO, Logger, LoggingConfigurer, ProfileInfo, TextUtils } from "@zowe/imperative";
import { AbstractSession, Imperative, ImperativeError,
ImperativeExpect, IO, Logger, LoggingConfigurer, ProfileInfo, TextUtils } from "@zowe/imperative";
import { ISetupEnvironmentParms } from "./doc/parms/ISetupEnvironmentParms";
import { ITestEnvironment } from "./doc/response/ITestEnvironment";
import { TempTestProfiles } from "./TempTestProfiles";
Expand Down Expand Up @@ -71,7 +72,7 @@ export class TestEnvironment {
jobs: [], // Array of IJob objects
jobData: [], // Array of objects with jobid and jobname
datasets: [],
...(session && { session }) // Only include session if it is passed in
...session && { session } // Only include session if it is passed in
}
};

Expand Down Expand Up @@ -143,7 +144,7 @@ export class TestEnvironment {
if (jobData.jobname && jobData.jobid) {
deleteJobCommon(session, jobData);
} else {
console.error('Error: Missing jobname or jobid for jobData:', jobData);
Imperative.console.info('Error: Missing jobname or jobid for jobData:', jobData);
}
}
for (const dataset of testEnvironment.resources.datasets) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("zos-jobs search job command", () => {

ACCOUNT = defaultSystem.tso.account;
// TODO: fix this test to run with any job name
JOB_NAME = "IEFBR14T"//REAL_SESSION.ISession.user.substring(0, JOB_LENGTH).toUpperCase();
JOB_NAME = "IEFBR14T"; //REAL_SESSION.ISession.user.substring(0, JOB_LENGTH).toUpperCase()
NON_HELD_JOBCLASS = defaultSystem.zosjobs.jobclass;
SEARCH_STRING = "PGM=IEFBR14";
REGEX_STRING = "IEFBR14|RC=0000";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let systemProps: ITestPropertiesSchema;
let account: string;
let jcl: string;
let JOB_NAME: string;
const jobNameRegex = /jobname: (\w+)/
const jobNameRegex = /jobname: (\w+)/;

describe("zos-jobs submit stdin command", () => {
beforeAll(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import { Create, CreateDataSetTypeEnum, Delete, IUploadOptions, IZosFilesResponse,
Upload, ZosFilesMessages, Download, Get, ZosFilesConstants, IUploadMap, Utilities } from "../../../../src";
import { Imperative, Session } from "@zowe/imperative";
import { inspect } from "util";
import { ITestEnvironment, TestEnvironment } from "@zowe/cli-test-utils";
import { ITestPropertiesSchema } from "../../../../../../__tests__/__src__/properties/ITestPropertiesSchema";
import { getUniqueDatasetName, stripNewLines, delay } from "../../../../../../__tests__/__src__/TestUtils";
Expand Down Expand Up @@ -72,7 +71,9 @@ describe("All Upload Tests", () => {

// longline/longline.txt
const longlineFilePath = `${localDir}/longline/longline.txt`;
fs.writeFileSync(longlineFilePath, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
fs.writeFileSync(longlineFilePath,
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs"+
"tuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
testEnvironment.resources.localFiles.push(longlineFilePath);

// space dir/file4.txt
Expand All @@ -96,7 +97,7 @@ describe("All Upload Tests", () => {
// main.exe is too complex to build from scratch

} catch (err) {
console.error("Error setting up test files and directories:", err);
Imperative.console.info("Error setting up test files and directories:", err);
}
});

Expand All @@ -111,7 +112,7 @@ describe("All Upload Tests", () => {
fs.rmdirSync(dir, { recursive: true });
}
} catch (err) {
console.error(`Error deleting directory: ${dir}`, err);
Imperative.console.info(`Error deleting directory: ${dir}`, err);
}
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ describe("CancelJobs System tests - encoded", () => {
beforeAll(async () => {
testEnvironment = await TestEnvironment.setUp({
testName: "zos_cancel_jobs_encoded"
}, REAL_SESSION = await TestEnvironment.createSession());
}, REAL_SESSION = await TestEnvironment.createSession());
systemProps = testEnvironment.systemTestProperties;

const ACCOUNT = systemProps.tso.account;
Expand Down
6 changes: 3 additions & 3 deletions packages/zosjobs/__tests__/__system__/GetJobs.system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ describe("Get Jobs System Tests", () => {
}, LONG_TIMEOUT);
});
});
/**********************************************/
/**********************************************/
// API methods "getJobs..." system tests
describe("Get Jobs APIs", () => {

Expand Down Expand Up @@ -443,7 +443,7 @@ describe("Get Jobs System Tests", () => {
});
});

/**********************************************/
/**********************************************/
// API methods "getStatus..." system tests
describe("Get Status APIs", () => {

Expand Down Expand Up @@ -1330,7 +1330,7 @@ describe("Get Jobs System Tests", () => {
const jobRender = iefbr14JclTemplate;
const renderedJcl = TextUtils.renderWithMustache(jobRender,
{JOBNAME: MONITOR_JOB_NAME, ACCOUNT, JOBCLASS, TYPERUNPARM: "", SYSAFF});

// Submit the job
const job = await SubmitJobs.submitJcl(REAL_SESSION, renderedJcl);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe("Search Jobs - System Tests", () => {
"//" + MONITOR_JOB_NAME + " JOB '" + ACCOUNT + "',CLASS=" + JOBCLASS + "\n" +
"//IEFBR14 EXEC PGM=IEFBR14"; // GetJobs
});
s

afterAll(async () => {
await TestEnvironment.cleanUp(testEnvironment);
});
Expand Down

0 comments on commit 3853c8a

Please sign in to comment.