Conversation
f0c19cf
to
8420962
Compare
t.Fatalf("Expected but didn't find %q in %v", expected, err) | ||
} | ||
|
||
child.SendLine("yes") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing err =
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or put it inside the if, also, we need to print the error
8420962
to
b30229e
Compare
t.Logf("Trust the key with the correct prefix\n") | ||
runRktTrust(t, ctx, "coreos.com/rkt-inspect") | ||
|
||
t.Logf("Finally, run successfull the signed image\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"successfully"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@iaguis : thanks for the review. Branch updated. |
t.Logf("Trust the key even more\n") | ||
runRktTrust(t, ctx, "foo.com") | ||
runRktTrust(t, ctx, "example.com/my-app") | ||
runRktTrust(t, ctx, "") // --root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also test only trusting the key with --root
and make sure it works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I added a test for --root
on imageFile2
.
c44589a
to
36b62d9
Compare
@iaguis updated again. |
36b62d9
to
2154fc4
Compare
func TestTrust(t *testing.T) { | ||
imageFile := patchTestACI("rkt-inspect-trust1.aci", "--exec=/inspect --print-msg=Hello", "--name=rkt-prefix.com/my-app") | ||
defer os.Remove(imageFile) | ||
defer os.Remove(imageFile + ".asc") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably doesn't matter but the signature file is not created until you call runSignImage
so this should appear after that.
A couple of nits but LGTM |
2154fc4
to
f807bea
Compare
Updated |
Merge on green 👍 |
Fixes #1491
Also, add a functional test for
rkt trust
.