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

fix: await http response in AWS EKS detector #2076

Merged
merged 2 commits into from
Apr 8, 2021

Conversation

vreynolds
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

  • test suite was failing on node 15 because it no longer allows unhandled promise rejections
    • this was due to not awaiting a promise response from _isEks in the detector, so the if block was never evaluating the result of the call
  • "unsuccessful" test cases were noop (error assertions never executed), because detect wraps itself in a try/catch, and never throws
    • updated those test cases to document current behavior
    • fixed the flipped test names

* previously missing await on a promise response
* update tests to reflect current behavior
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 5, 2021

CLA Signed

The committers are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Apr 5, 2021

Codecov Report

Merging #2076 (e8436c7) into main (64c8ef5) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head e8436c7 differs from pull request most recent head 9d7209e. Consider uploading reports for the commit 9d7209e to get more accurate results

@@            Coverage Diff             @@
##             main    #2076      +/-   ##
==========================================
+ Coverage   92.72%   92.74%   +0.01%     
==========================================
  Files         137      137              
  Lines        5048     5048              
  Branches     1054     1054              
==========================================
+ Hits         4681     4682       +1     
+ Misses        367      366       -1     
Impacted Files Coverage Δ
...ource-detector-aws/src/detectors/AwsEksDetector.ts 91.13% <100.00%> (+1.26%) ⬆️

@dyladan
Copy link
Member

dyladan commented Apr 5, 2021

/cc @KKelvinLo original package author

/cc @willarmiros current AWS contact

Copy link
Contributor

@willarmiros willarmiros left a comment

Choose a reason for hiding this comment

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

lgtm

@dyladan dyladan added the bug Something isn't working label Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests failing in tip of master
4 participants