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

Windows location path compatibility in amplify-cli resource tests #7711

Closed
4 tasks done
studpeps opened this issue Jul 13, 2021 · 1 comment · Fixed by #7712
Closed
4 tasks done

Windows location path compatibility in amplify-cli resource tests #7711

studpeps opened this issue Jul 13, 2021 · 1 comment · Fixed by #7712
Assignees
Labels
windows Issues tied to running the CLI on Windows

Comments

@studpeps
Copy link
Contributor

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?

yarn

If applicable, what version of Node.js are you using?

14.0.0

Amplify CLI Version

5.1.0

What operating system are you using?

Windows

Amplify Categories

Not applicable

Amplify Commands

Not applicable

Describe the bug

Location path in different operating systems is defined with varied usage of forward and back slashes,
resource tests need to made OS-specific in order to avoid failure of test cases

Resource tests has function calls being made whose file path aren't being located due to the above discrepancy:

Line 218: packages\amplify-cli\src_tests_\extensions\amplify-helpers\remove-resource.test.ts

expect(context.filesystem.remove).toBeCalledWith('backendDirPath/function/lambda1');

Expected behavior

Make file location path format os-specific

Reproduction steps

  1. cd packages/amplify-cli
  2. yarn test on Windows

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line


Additional information

No response

@cjihrig cjihrig added the windows Issues tied to running the CLI on Windows label Jul 13, 2021
@cjihrig cjihrig linked a pull request Jul 13, 2021 that will close this issue
4 tasks
@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
windows Issues tied to running the CLI on Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants