Skip to content

Conversation

@Hweinstock
Copy link
Contributor

Problem

Follow up from #5689, focusing on the test files.

Solution

Mostly direct translation, one implementation change from writeJson to Json.stringify then writeFile in packages/core/src/test/awsService/cdk/detectCdkProjects.test.ts line 120


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Hweinstock Hweinstock marked this pull request as ready for review October 3, 2024 17:38
@Hweinstock Hweinstock requested a review from a team as a code owner October 3, 2024 17:38
@Hweinstock
Copy link
Contributor Author

/runIntegrationTests

@Hweinstock
Copy link
Contributor Author

/runIntegrationTests

@justinmk3
Copy link
Contributor

this failure on the "minimum" unit test job might be relevant to this PR?

  3 failing
  1) CodeDownloader
       "after each" hook for "should return an error if the response body is not Buffer":
     EntryIsADirectory (FileSystemError): Error: EISDIR: illegal operation on a directory, unlink '/tmp/aws-toolkit-vscode/vsctk4b58ed57'
      at Function._handleError (/tmp/.vscode-test/vscode-linux-x64-1.68.0/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:121929)
      at Object.delete (/tmp/.vscode-test/vscode-linux-x64-1.68.0/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:121007)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Context.<anonymous> (/codebuild/output/src373008039/src/github.com/aws/aws-toolkit-vscode/packages/core/src/test/eventSchemas/commands/downloadSchemaItemCode.test.ts:52:9)

  2) CodeGenerator
       "after each" hook for "should return the current status of code generation":
     EntryIsADirectory (FileSystemError): Error: EISDIR: illegal operation on a directory, unlink '/tmp/aws-toolkit-vscode/vsctkddbc90b6'
      at Function._handleError (/tmp/.vscode-test/vscode-linux-x64-1.68.0/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:121929)
      at Object.delete (/tmp/.vscode-test/vscode-linux-x64-1.68.0/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:121007)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Context.<anonymous> (/codebuild/output/src373008039/src/github.com/aws/aws-toolkit-vscode/packages/core/src/test/eventSchemas/commands/downloadSchemaItemCode.test.ts:132:9)

  3) CodeGeneratorStatusPoller
       "after each" hook for "should return the current status of code generation":
     EntryIsADirectory (FileSystemError): Error: EISDIR: illegal operation on a directory, unlink '/tmp/aws-toolkit-vscode/vsctkc02d59ff'
      at Function._handleError (/tmp/.vscode-test/vscode-linux-x64-1.68.0/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:121929)
      at Object.delete (/tmp/.vscode-test/vscode-linux-x64-1.68.0/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:121007)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Context.<anonymous> (/codebuild/output/src373008039/src/github.com/aws/aws-toolkit-vscode/packages/core/src/test/eventSchemas/commands/downloadSchemaItemCode.test.ts:205:9)

@Hweinstock
Copy link
Contributor Author

/runIntegrationTests

@Hweinstock
Copy link
Contributor Author

/runIntegrationTests

@Hweinstock
Copy link
Contributor Author

Yep, looks fixed now. The last one is the one fixed here: #5725

@Hweinstock Hweinstock merged commit 1bfd53b into aws:master Oct 4, 2024
24 of 30 checks passed
@Hweinstock Hweinstock deleted the removeFsExtra2 branch October 4, 2024 20:39
import { fs } from '../../../shared'

/** Async version of "doesNotThrow" */
async function assertDoesNotThrow(fn: () => Promise<void>): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does assert.doesNotReject work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants