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

PS and CLI creds #2433

Merged
merged 22 commits into from
Dec 1, 2023
Merged

PS and CLI creds #2433

merged 22 commits into from
Dec 1, 2023

Conversation

nakulkar-msft
Copy link
Member

No description provided.

go.mod Outdated Show resolved Hide resolved
@@ -114,6 +114,17 @@ func GetOAuthTokenManagerInstance() (*common.UserOAuthTokenManager, error) {

case "DEVICE":
lca.identity = false

case "AZCLI":
lca.identity = false
Copy link
Member

Choose a reason for hiding this comment

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

in the future we might be able to improve this by creating an enum for oauth cred type instead of having a bunch of booleans

return output, nil
}

func (c *PowershellContextCredential) createAccessToken(tk []byte) (azcore.AccessToken, error) {
Copy link
Member

Choose a reason for hiding this comment

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

can we add UT for some of these methods?

Copy link
Member

Choose a reason for hiding this comment

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

Did you add tests for some of these methods?

Copy link
Member Author

Choose a reason for hiding this comment

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

The test covers entire workflow.

Copy link
Member

Choose a reason for hiding this comment

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

Which test? I only see some changes to runner, how does that get picked up in CI?

Copy link
Member Author

Choose a reason for hiding this comment

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

KMN. Thanks for getting this. I had not checked in the file. I've checked in now, need to get some environment vars correct in CI.

Copy link
Member

Choose a reason for hiding this comment

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

great! thanks for double checking that. I thought I was going crazy for a minute

Copy link
Member

@gapra-msft gapra-msft left a comment

Choose a reason for hiding this comment

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

left some comments

@@ -32,7 +32,7 @@ import (
var loginCmdArg = loginCmdArgs{tenantID: common.DefaultTenantID}

var loginNotice = "'azcopy %s' command will be deprecated starting release 10.22. " +
Copy link
Contributor

Choose a reason for hiding this comment

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

You could probably update this to 10.23 since we are skipping this release, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add that as a different review. Deviates from topic.

e2etest/runner.go Show resolved Hide resolved
Copy link
Member

@gapra-msft gapra-msft left a comment

Choose a reason for hiding this comment

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

please create an item to add automated tests for this in the future

@nakulkar-msft nakulkar-msft added this to the 10.22 milestone Nov 29, 2023
@nakulkar-msft nakulkar-msft merged commit 26640e7 into dev Dec 1, 2023
17 checks passed
@nakulkar-msft nakulkar-msft deleted the nakulkar/private/psCLICreds branch December 5, 2023 05:09
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.

5 participants