Skip to content
This repository was archived by the owner on Apr 7, 2024. It is now read-only.

feat: support logout#44

Merged
shizhMSFT merged 5 commits into
oras-project:mainfrom
wangxiaoxuan273:logout
Apr 13, 2023
Merged

feat: support logout#44
shizhMSFT merged 5 commits into
oras-project:mainfrom
wangxiaoxuan273:logout

Conversation

@wangxiaoxuan273

@wangxiaoxuan273 wangxiaoxuan273 commented Apr 7, 2023

Copy link
Copy Markdown
Collaborator

Resolves #32

@codecov-commenter

codecov-commenter commented Apr 7, 2023

Copy link
Copy Markdown

Codecov Report

Merging #44 (9544177) into main (d122fdd) will decrease coverage by 1.89%.
The diff coverage is 50.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
- Coverage   72.30%   70.42%   -1.89%     
==========================================
  Files           2        2              
  Lines          65       71       +6     
==========================================
+ Hits           47       50       +3     
- Misses         15       17       +2     
- Partials        3        4       +1     
Impacted Files Coverage Δ
registry.go 71.05% <50.00%> (-3.95%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Comment thread logout_test.go Outdated
Comment thread logout.go Outdated
Signed-off-by: wangxiaoxuan273 <wangxiaoxuan119@gmail.com>
Signed-off-by: wangxiaoxuan273 <wangxiaoxuan119@gmail.com>
Signed-off-by: wangxiaoxuan273 <wangxiaoxuan119@gmail.com>
Signed-off-by: wangxiaoxuan273 <wangxiaoxuan119@gmail.com>

@Wwwsylvia Wwwsylvia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread registry.go Outdated
func Logout(ctx context.Context, store Store, registryName string) error {
registryName = mapHostname(registryName)
if err := store.Delete(ctx, registryName); err != nil {
return fmt.Errorf("unable to logout of the registry %s: %w", registryName, err)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This error message is not consistent with line 53.

BTW, for line 49, it should not be "unable to login to the registry" but "unable to ping the registry".

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

changed accordingly.

Signed-off-by: wangxiaoxuan273 <wangxiaoxuan119@gmail.com>

@shizhMSFT shizhMSFT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@shizhMSFT shizhMSFT merged commit 35fab4a into oras-project:main Apr 13, 2023
@wangxiaoxuan273 wangxiaoxuan273 deleted the logout branch April 14, 2023 02:43
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.

Support logout

4 participants