Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

rkt: add --full flag to fetch #1976

Merged
merged 3 commits into from Jan 19, 2016
Merged

rkt: add --full flag to fetch #1976

merged 3 commits into from Jan 19, 2016

Conversation

iaguis
Copy link
Member

@iaguis iaguis commented Jan 14, 2016

It prints the full image hash instead of a truncated one.

Fixes #1967

@iaguis
Copy link
Member Author

iaguis commented Jan 14, 2016

I'll add a functional test.

@iaguis
Copy link
Member Author

iaguis commented Jan 15, 2016

Added a test.

@alban
Copy link
Member

alban commented Jan 15, 2016

@@ -200,7 +200,7 @@ func importImageAndFetchHashAsGid(t *testing.T, ctx *testutils.RktRunCtx, img st
}

// Read out the image hash.
result, out, err := expectRegexWithOutput(child, "sha512-[0-9a-f]{32}")
result, out, err := expectRegexWithOutput(child, "sha512-[0-9a-f]{32,}")
Copy link
Member

Choose a reason for hiding this comment

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

What does {32,} mean? Either 32 characters or 1 character?

Copy link
Member Author

Choose a reason for hiding this comment

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

x{n,}          n or more x, prefer more

https://golang.org/pkg/regexp/syntax/

Copy link
Member

Choose a reason for hiding this comment

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

Why not using x{32,64}

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, didn't see that 😅

@iaguis
Copy link
Member Author

iaguis commented Jan 15, 2016

Documentation: subcommands/fetch.md

That sounds great but I think we should do that for in a consistent way for every command instead of trying to squeeze it in the current docs.

We can do that in a follow-up.

@iaguis
Copy link
Member Author

iaguis commented Jan 15, 2016

#1980

@alban
Copy link
Member

alban commented Jan 19, 2016

LGTM after a rebase, if Semaphore is still green.

@iaguis
Copy link
Member Author

iaguis commented Jan 19, 2016

Rebased.

iaguis added a commit that referenced this pull request Jan 19, 2016
@iaguis iaguis merged commit f24fac2 into rkt:master Jan 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants