Convert to assert.NilError
Using:
git grep -l '^\s\+assert\.Check(t, err)$' | \
xargs sed -i -e 's/^\(\s\+assert\)\.Check(t, err)$/\1.NilError(t, err)/'
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
@ -20,7 +20,7 @@ func TestCommonOptionsInstallFlags(t *testing.T) {
|
||||
"--tlscert=\"/foo/cert\"",
|
||||
"--tlskey=\"/foo/key\"",
|
||||
})
|
||||
assert.Check(t, err)
|
||||
assert.NilError(t, err)
|
||||
assert.Check(t, is.Equal("/foo/cafile", opts.TLSOptions.CAFile))
|
||||
assert.Check(t, is.Equal("/foo/cert", opts.TLSOptions.CertFile))
|
||||
assert.Check(t, is.Equal(opts.TLSOptions.KeyFile, "/foo/key"))
|
||||
@ -36,7 +36,7 @@ func TestCommonOptionsInstallFlagsWithDefaults(t *testing.T) {
|
||||
opts.InstallFlags(flags)
|
||||
|
||||
err := flags.Parse([]string{})
|
||||
assert.Check(t, err)
|
||||
assert.NilError(t, err)
|
||||
assert.Check(t, is.Equal(defaultPath("ca.pem"), opts.TLSOptions.CAFile))
|
||||
assert.Check(t, is.Equal(defaultPath("cert.pem"), opts.TLSOptions.CertFile))
|
||||
assert.Check(t, is.Equal(defaultPath("key.pem"), opts.TLSOptions.KeyFile))
|
||||
|
||||
Reference in New Issue
Block a user