Skip to content

Commit

Permalink
fix(ds): Fix invalid response from DS list API when data sets are arc…
Browse files Browse the repository at this point in the history
…hived

Signed-off-by: Timothy Johnson <[email protected]>
  • Loading branch information
t1m0thyj committed Oct 2, 2024
1 parent 22b8a00 commit 46f23fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/zosfiles/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Zowe z/OS files SDK package will be documented in this file.

## Recent Changes

- BugFix: Fixed an issue with `List.dataSetsMatchingPattern` method where migrated data sets could break fetching attributes for other data sets. [#2285](https://github.com/zowe/zowe-cli/issues/2285)

## `8.0.0`

- MAJOR: v8.0.0 Release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ describe("z/OS Files - List", () => {
});

expect(listDataSetSpy).toHaveBeenCalledTimes(3);
expect(listDataSetSpy).toHaveBeenCalledWith(dummySession, dataSetPS.dsname, {attributes: true});
expect(listDataSetSpy).toHaveBeenLastCalledWith(dummySession, dataSetPS.dsname, {attributes: true, maxLength: 1});
});

it("should handle an error when the exclude pattern is specified", async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/zosfiles/src/methods/list/List.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export class List {
listsInitiated++;
}

return List.dataSet(session, dataSetObj.dsname, { attributes: true }).then(
return List.dataSet(session, dataSetObj.dsname, { attributes: true, maxLength: 1 }).then(
(tempResponse) => {
Object.assign(dataSetObj, tempResponse.apiResponse.items[0]);
},
Expand Down

0 comments on commit 46f23fb

Please sign in to comment.