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

feat(credential-provider-imds): update httpGet to accept options.method #1353

Merged
merged 8 commits into from
Jul 10, 2020

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Jul 10, 2020

Issue #, if available:
Required for PUT operation in signed IMDS workflow (internal JS-1903)

Description of changes:

  • update httpGet to accept options.method
  • uses nock for simplifying http request tests
  • populates statusCode in ProviderError, as it would be consumed in signed IMDS workflow.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

Codecov Report

Merging #1353 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1353      +/-   ##
==========================================
+ Coverage   77.67%   77.69%   +0.01%     
==========================================
  Files         286      287       +1     
  Lines       11955    11979      +24     
  Branches     2623     2627       +4     
==========================================
+ Hits         9286     9307      +21     
- Misses       2669     2672       +3     
Impacted Files Coverage Δ
packages/property-provider/src/fromStatic.ts 100.00% <0.00%> (ø)
packages/middleware-retry/src/defaultStrategy.ts 100.00% <0.00%> (ø)
...kages/retry-config-provider/src/defaultProvider.ts 100.00% <0.00%> (ø)
...edential-provider-imds/src/fromInstanceMetadata.ts 100.00% <0.00%> (ø)
...ential-provider-imds/src/remoteProvider/httpGet.ts
...al-provider-imds/src/remoteProvider/httpRequest.ts 100.00% <0.00%> (ø)
.../middleware-sdk-transcribe-streaming/src/signer.ts 80.00% <0.00%> (ø)
...tream-serde-universal/src/getUnmarshalledStream.ts 75.00% <0.00%> (+1.92%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54d2429...6457925. Read the comment docs.

Copy link
Contributor

@alexforsyth alexforsyth left a comment

Choose a reason for hiding this comment

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

Nice +1

@@ -29,6 +29,7 @@
"@types/jest": "^26.0.4",
"@types/node": "^10.0.0",
"jest": "^26.1.0",
"nock": "^13.0.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer adding the dev dependency to the project root, just like all the E2E test dependencies. Doing so can reduce the number dependencies user needs to download.

@trivikr trivikr merged commit db2651c into aws:master Jul 10, 2020
@trivikr trivikr deleted the credential-provider-imds-http-request branch July 10, 2020 17:32
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants