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

upload dir-to-uss with .zosttributes - lts-incremental #366

Merged
merged 15 commits into from May 13, 2019

Conversation

@matthewpwilson
Copy link
Contributor

commented May 2, 2019

Port #334 and #364 to lts-incremental

matthewpwilson and others added some commits Apr 5, 2019

Implement upload with attributes file
Signed-off-by: Matthew Wilson <matthew.wilson@uk.ibm.com>
additonal .zosattribute tests
Signed-off-by: Chris Atkinson <atkinchr@uk.ibm.com>
Encode pathname for tag requests
Signed-off-by: Matthew Wilson <matthew.wilson@uk.ibm.com>
Update file with spaces test
Signed-off-by: Chris Atkinson <atkinchr@uk.ibm.com>
Help updates
Signed-off-by: Matthew Wilson <matthew.wilson@uk.ibm.com>
fix system tests for normalized new lines
Signed-off-by: boech02 <Christopher.Boehm@broadcom.com>
Complete Utilites.system.test
Signed-off-by: Matthew Wilson <matthew.wilson@uk.ibm.com>
Update test snapshots
Signed-off-by: Matthew Wilson <matthew.wilson@uk.ibm.com>
@ChrisBoehmCA
Copy link
Contributor

left a comment

Thanks for porting #334 and #364

@matthewpwilson

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

Hmmm... jest is complaining about obsolete snapshots. I tried running with -u, but it then just gave me errors trying to delete the files. How can I get rid of these?

@ChrisBoehmCA

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

Hmm, npm run test:unit -- -u should work. Maybe try from an admin terminal?

@ChrisBoehmCA
Copy link
Contributor

left a comment

Sorry, need to fix the obsolete snapshots before merging

@matthewpwilson

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

Sorry, I've no idea what's going with this. Running npm run test:unit -- -u I get the following:

Summary of all failing tests
 FAIL  packages/zosfiles/__tests__/cli/download/Download.definition.unit.test.ts
  ● Test suite failed to run

    ENOENT: no such file or directory, unlink '/home/mattwil/git/zowe-cli/packages/zosfiles/__tests__/cli/download/__snapshots__/Download.definition.unit.test.ts.snap'

      at SnapshotState.save (node_modules/jest-snapshot/build/State.js:158:21)

 FAIL  packages/zostso/__tests__/api/IssueTso.unit.test.ts
  ● Test suite failed to run

    ENOENT: no such file or directory, unlink '/home/mattwil/git/zowe-cli/packages/zostso/__tests__/api/__snapshots__/IssueTso.unit.test.ts.snap'

      at SnapshotState.save (node_modules/jest-snapshot/build/State.js:158:21)

 FAIL  packages/zosfiles/__tests__/cli/ZosFiles.definition.unit.test.ts
  ● Test suite failed to run

    ENOENT: no such file or directory, unlink '/home/mattwil/git/zowe-cli/packages/zosfiles/__tests__/cli/__snapshots__/ZosFiles.definition.unit.test.ts.snap'

      at SnapshotState.save (node_modules/jest-snapshot/build/State.js:158:21)

It's true those directories don't exist - there's no snapshots in packages/zosfiles/tests/cli. So I don't know why it's trying to delete those files! The tests in questions don't use any snapshots, and I've not touched them.

I can't seem to find out which snapshots are obsolete either.

@ChrisBoehmCA

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

We are looking into this. We're getting the same behavior on Windows. Not sure what's causing it. I can't see the files it's complaining about either

Problem tests commented out just for now
Signed-off-by: Colin-Stone <30794003+Colin-Stone@users.noreply.github.com>
Signed-off-by: Colin-Stone <30794003+Colin-Stone@users.noreply.github.com>

@ghost ghost assigned Colin-Stone May 8, 2019

@ghost ghost added the review label May 8, 2019

Problem tests commented out - 2 more
Signed-off-by: Colin-Stone <30794003+Colin-Stone@users.noreply.github.com>
Signed-off-by: Colin-Stone <30794003+Colin-Stone@users.noreply.github.com>
@ChrisBoehmCA

This comment has been minimized.

Copy link
Contributor

commented May 10, 2019

This was happening to me because I was mocking fs.existsSync and forgot to call jest.resetAllMocks() after. Looks like you have the same problem

Can you try resetting all mocks at the end of all the unit test scenarios where you mocked fs functions? That might solve the obsolete snapshots issue. Thanks @Nitive

@ChrisBoehmCA

This comment has been minimized.

Copy link
Contributor

commented May 10, 2019

Could you also move @types/minimatch to devDependencies? Not sure why but having @types in regular dependencies seems to cause issues when users globally install the package

matthewpwilson added some commits May 13, 2019

Merge branch 'lts-incremental' of github.com:zowe/zowe-cli into uploa…
…d-lts

Conflicts:
	__tests__/__src__/TestUtils.ts
	packages/zosfiles/__tests__/__system__/api/methods/utilities/Utilities.system.test.ts
	packages/zosfiles/__tests__/api/methods/utilities/Utilities.unit.test.ts
	packages/zosfiles/src/api/methods/utilities/Utilities.ts
	packages/zosfiles/src/api/methods/utilities/index.ts
Move @types/minimathc to devDeps
Signed-off-by: Matthew Wilson <matthew.wilson@uk.ibm.com>
Merge branch 'upload-lts' of github.com:matthewpwilson/zowe-cli into …
…upload-lts

Signed-off-by: Matthew Wilson <matthew.wilson@uk.ibm.com>
Uncomment tests and restore mocks
Signed-off-by: Matthew Wilson <matthew.wilson@uk.ibm.com>

@matthewpwilson matthewpwilson force-pushed the matthewpwilson:upload-lts branch from 02e7272 to f4a9428 May 13, 2019

@matthewpwilson

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2019

Thanks for the help, tests are now working again. Also moved the minimatch dependency. Apologies for the force push, I forgot to signoff the first time .

@zFernand0 zFernand0 merged commit 0eb7c82 into zowe:lts-incremental May 13, 2019

1 of 2 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
DCO DCO
Details

@ghost ghost removed the review label May 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.