Skip to content

Commit

Permalink
Merge pull request #2132 from zowe/add-pds-search
Browse files Browse the repository at this point in the history
Make all requested changes
  • Loading branch information
awharn authored May 8, 2024
2 parents cc509ce + 1016963 commit cb6dd87
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 25 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe("Search data sets", () => {
const response = runCliScript(shellScript, TEST_ENVIRONMENT, ["IBMUSER.*"]);
expect(response.status).toBe(1);
expect(response.stderr.toString()).toContain("Missing Positional Argument");
expect(response.stderr.toString()).toContain("search-string");
expect(response.stderr.toString()).toContain("searchString");
});

it("should fail if the maximum concurrent requests are out of range 1", () => {
Expand All @@ -59,18 +59,18 @@ describe("Search data sets", () => {
expect(response.status).toBe(1);
expect(response.stderr.toString()).toContain("Invalid numeric value specified for option");
expect(response.stderr.toString()).toContain("max-concurrent-requests");
expect(response.stderr.toString()).toContain("1 and 99999");
expect(response.stderr.toString()).toContain("1 and 100");
expect(response.stderr.toString()).toContain("-1");
});

it("should fail if the maximum concurrent requests are out of range 2", () => {
const shellScript = path.join(__dirname, "__scripts__", "command", "command_search_data_sets.sh");
const response = runCliScript(shellScript, TEST_ENVIRONMENT, ["IBMUSER.*", "TESTDATA", "--max-concurrent-requests 100000"]);
const response = runCliScript(shellScript, TEST_ENVIRONMENT, ["IBMUSER.*", "TESTDATA", "--max-concurrent-requests 101"]);
expect(response.status).toBe(1);
expect(response.stderr.toString()).toContain("Invalid numeric value specified for option");
expect(response.stderr.toString()).toContain("max-concurrent-requests");
expect(response.stderr.toString()).toContain("1 and 99999");
expect(response.stderr.toString()).toContain("100000");
expect(response.stderr.toString()).toContain("1 and 100");
expect(response.stderr.toString()).toContain("101");
});

});
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The maximum number of TSO address spaces have been created. When you specify 0,
"name": "max-concurrent-requests",
"numericValueRange": Array [
0,
99999,
100,
],
"type": "number",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The maximum number of TSO address spaces have been created. When you specify 0,
"name": "max-concurrent-requests",
"numericValueRange": Array [
0,
99999,
100,
],
"type": "number",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The maximum number of TSO address spaces have been created. When you specify 0,
"name": "max-concurrent-requests",
"numericValueRange": Array [
0,
99999,
100,
],
"type": "number",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Array [
"name": "max-concurrent-requests",
"numericValueRange": Array [
1,
99999,
100,
],
"type": "number",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The maximum number of TSO address spaces have been created. When you specify 0,
"name": "max-concurrent-requests",
"numericValueRange": Array [
0,
99999,
100,
],
"type": "number",
},
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/zosfiles/-strings-/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export default {
`(e.g. "ibmuser.j*.old" matches "ibmuser.jcl.old" but not "ibmuser.jcl.very.old")
${TextUtils.chalk.yellow("**")}: matches any number of characters within any number of data set name qualifiers ` +
`(e.g. "ibmuser.**.old" matches both "ibmuser.jcl.old" and "ibmuser.jcl.very.old")
However, the pattern cannot begin with any of these sequences.You can specify multiple patterns separated by commas, ` +
However, the pattern cannot begin with any of these sequences. You can specify multiple patterns separated by commas, ` +
`for example "ibmuser.**.cntl,ibmuser.**.jcl"`
},
EXAMPLES: {
Expand Down Expand Up @@ -601,7 +601,7 @@ export default {
`(e.g. "ibmuser.j*.old" matches "ibmuser.jcl.old" but not "ibmuser.jcl.very.old")
${TextUtils.chalk.yellow("**")}: matches any number of characters within any number of data set name qualifiers ` +
`(e.g. "ibmuser.**.old" matches both "ibmuser.jcl.old" and "ibmuser.jcl.very.old")
However, the pattern cannot begin with any of these sequences.You can specify multiple patterns separated by commas, ` +
However, the pattern cannot begin with any of these sequences. You can specify multiple patterns separated by commas, ` +
`for example "ibmuser.**.cntl,ibmuser.**.jcl"`
},
OPTIONS: {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/zosfiles/download/Download.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import i18nTypings from "../-strings-/en";
const strings = (require("../-strings-/en").default as typeof i18nTypings).DOWNLOAD.OPTIONS;

/** @internal */
export const maxConcurrentRequestsMaxValue = 99999;
export const maxConcurrentRequestsMaxValue = 100;

/**
* Object containing all options to be used by the Download data set API
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/zosfiles/search/ds/DataSets.definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const DataSetsDefinition: ICommandDefinition = {
required: true
},
{
name: "search-string",
name: "searchString",
description: strings.OPTIONS.SEARCHSTRING,
type: "string",
required: true
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/zosfiles/upload/Upload.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
*/

import { ICommandOptionDefinition } from "@zowe/imperative";
import { maxConcurrentRequestsMaxValue } from "../download/Download.options";

import i18nTypings from "../-strings-/en";

// Does not use the import in anticipation of some internationalization work to be done later.
const strings = (require("../-strings-/en").default as typeof i18nTypings).UPLOAD.OPTIONS;

const maxConcurrentRequestsMaxValue = 99999;

/**
* Object containing all options to be used by the Upload API
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* This interface defines the information that is stored in the download data set API return object
*/
export interface ISearchMatchLocation {

/**
* The line number that the match was found in
*/
Expand Down

0 comments on commit cb6dd87

Please sign in to comment.