ruimarinho / gsts

Obtain and store AWS STS credentials to interact with Amazon services by authenticating via G Suite SAML.
MIT License
212 stars 37 forks source link

Sort by ARN when interactively prompting so that accounts are grouped together when multiple roles exist #58

Closed spasam closed 1 year ago

spasam commented 2 years ago

@ruimarinho could you please take a look at this simple change? Thanks

ruimarinho commented 2 years ago

@spasam I like the idea but I would prefer if this was done under credentials-manager.js to make it testable (https://github.com/ruimarinho/gsts/blob/master/credentials-manager.js#L89). Can you make that change please?

spasam commented 2 years ago

@spasam I like the idea but I would prefer if this was done under credentials-manager.js to make it testable (https://github.com/ruimarinho/gsts/blob/master/credentials-manager.js#L89). Can you make that change please?

Sure. Just made the change. Unrelated change in index.js is just replacing tabs with spaces.

ruimarinho commented 2 years ago

Thank you! Could you please add a test to ensure the feature remains covered? Appreciated!

spasam commented 2 years ago

Yeah, was just looking at that. Looks like I can re-order stuff in existing test and probably also add new one

spasam commented 2 years ago

Updated:

$ npm test

> gsts@4.0.1 test
> jest

 PASS  ./credentials-manager.test.js
 PASS  ./parser.test.js

Test Suites: 2 passed, 2 total
Tests:       25 passed, 25 total
Snapshots:   0 total
Time:        0.418 s, estimated 1 s
Ran all test suites.
ruimarinho commented 1 year ago

This is nice developer experience @spasam. Thank you :)