Merge pull request #5980 from thaJeztah/container_use_subtests
cli/command/container: TestNewCreateCommandWithContentTrustErrors use subtests
This commit is contained in:
commit
33494921b8
@ -248,6 +248,7 @@ func TestNewCreateCommandWithContentTrustErrors(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
fakeCLI := test.NewFakeCli(&fakeClient{
|
||||
createContainerFunc: func(config *container.Config,
|
||||
hostConfig *container.HostConfig,
|
||||
@ -265,6 +266,7 @@ func TestNewCreateCommandWithContentTrustErrors(t *testing.T) {
|
||||
cmd.SetArgs(tc.args)
|
||||
err := cmd.Execute()
|
||||
assert.ErrorContains(t, err, tc.expectedError)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user