integration/config: don't string-match errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
348f412d85
commit
18cae89436
1 changed files with 5 additions and 2 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/docker/docker/api/types/filters"
|
||||
swarmtypes "github.com/docker/docker/api/types/swarm"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/docker/docker/errdefs"
|
||||
"github.com/docker/docker/integration/internal/swarm"
|
||||
"github.com/docker/docker/pkg/stdcopy"
|
||||
"github.com/docker/docker/testutil/daemon"
|
||||
|
@ -151,8 +152,9 @@ func TestConfigsCreateAndDelete(t *testing.T) {
|
|||
err = c.ConfigRemove(ctx, configID)
|
||||
assert.NilError(t, err)
|
||||
|
||||
insp, _, err = c.ConfigInspectWithRaw(ctx, configID)
|
||||
assert.Check(t, is.ErrorContains(err, "No such config"))
|
||||
_, _, err = c.ConfigInspectWithRaw(ctx, configID)
|
||||
assert.Check(t, errdefs.IsNotFound(err))
|
||||
assert.Check(t, is.ErrorContains(err, configID))
|
||||
}
|
||||
|
||||
func TestConfigsUpdate(t *testing.T) {
|
||||
|
@ -203,6 +205,7 @@ func TestConfigsUpdate(t *testing.T) {
|
|||
// this test will produce an error in func UpdateConfig
|
||||
insp.Spec.Data = []byte("TESTINGDATA2")
|
||||
err = c.ConfigUpdate(ctx, configID, insp.Version, insp.Spec)
|
||||
assert.Check(t, errdefs.IsInvalidParameter(err))
|
||||
assert.Check(t, is.ErrorContains(err, "only updates to Labels are allowed"))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue