c8d: Adjust some integration-cli tests#46561
Conversation
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
rumpl
left a comment
There was a problem hiding this comment.
Yay, let's skip that TestPullFailsWithAlteredLayer test :D
|
Ideally, we should rewrite the |
| assert.Assert(c, is.Contains(out, "unexpected commit digest")) | ||
| assert.Assert(c, is.Contains(out, "expected "+manifestDigest)) | ||
| } else { | ||
| assert.Assert(c, is.Contains(out, fmt.Sprintf("manifest verification failed for digest %s", manifestDigest))) |
There was a problem hiding this comment.
Clearly not for this PR, but I know that manifest verification failed for digest has been a good error to search for; perhaps we can wrap containerd's error to add that as prefix in the error we return 🤔
| // This is the schema2 version of the test. | ||
| func (s *DockerRegistrySuite) TestPullFailsWithAlteredLayer(c *testing.T) { | ||
| testRequires(c, DaemonIsLinux) | ||
| skip.If(c, testEnv.UsingSnapshotter(), "Faked layer is already in the content store, so it won't be fetched from the repository at all.") |
There was a problem hiding this comment.
I'm good with skipping for now; would there still be a use to detect corrupted / manipulated data in the content-store (does containerd have anything for that?)
| expectedMsg := fmt.Sprintf("manifest for %s not found", imageReference) | ||
| if testEnv.UsingSnapshotter() { | ||
| expectedMsg = fmt.Sprintf("%s: not found", imageReference) | ||
| } |
There was a problem hiding this comment.
We should really ditch these tests and have a test in integration/ (checking the error-response as well as status, instead of just the string-matching).
See commits
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)