Replace uses of deprecated IsErr...Notfound()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2017-10-03 12:05:03 +02:00
parent a8e7aca3fd
commit 919726b5db
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
8 changed files with 9 additions and 9 deletions

View File

@ -62,7 +62,7 @@ func TestCheckpointListContainerNotFound(t *testing.T) {
}
_, err := client.CheckpointList(context.Background(), "unknown", types.CheckpointListOptions{})
if err == nil || !IsErrContainerNotFound(err) {
if err == nil || !IsErrNotFound(err) {
t.Fatalf("expected a containerNotFound error, got %v", err)
}
}

View File

@ -42,7 +42,7 @@ func TestConfigInspectConfigNotFound(t *testing.T) {
}
_, _, err := client.ConfigInspectWithRaw(context.Background(), "unknown")
if err == nil || !IsErrConfigNotFound(err) {
if err == nil || !IsErrNotFound(err) {
t.Fatalf("expected a configNotFoundError error, got %v", err)
}
}
@ -53,7 +53,7 @@ func TestConfigInspect(t *testing.T) {
version: "1.30",
client: newMockClient(func(req *http.Request) (*http.Response, error) {
if !strings.HasPrefix(req.URL.Path, expectedURL) {
return nil, fmt.Errorf("Expected URL '%s', got '%s'", expectedURL, req.URL)
return nil, fmt.Errorf("expected URL '%s', got '%s'", expectedURL, req.URL)
}
content, err := json.Marshal(swarm.Config{
ID: "config_id",

View File

@ -37,7 +37,7 @@ func TestContainerCreateImageNotFound(t *testing.T) {
client: newMockClient(errorMock(http.StatusNotFound, "No such image")),
}
_, err := client.ContainerCreate(context.Background(), &container.Config{Image: "unknown_image"}, nil, nil, "unknown")
if err == nil || !IsErrImageNotFound(err) {
if err == nil || !IsErrNotFound(err) {
t.Fatalf("expected an imageNotFound error, got %v", err)
}
}

View File

@ -30,7 +30,7 @@ func TestContainerInspectContainerNotFound(t *testing.T) {
}
_, err := client.ContainerInspect(context.Background(), "unknown")
if err == nil || !IsErrContainerNotFound(err) {
if err == nil || !IsErrNotFound(err) {
t.Fatalf("expected a containerNotFound error, got %v", err)
}
}

View File

@ -31,7 +31,7 @@ func TestImageInspectImageNotFound(t *testing.T) {
}
_, _, err := client.ImageInspectWithRaw(context.Background(), "unknown")
if err == nil || !IsErrImageNotFound(err) {
if err == nil || !IsErrNotFound(err) {
t.Fatalf("expected an imageNotFound error, got %v", err)
}
}

View File

@ -30,7 +30,7 @@ func TestNodeInspectNodeNotFound(t *testing.T) {
}
_, _, err := client.NodeInspectWithRaw(context.Background(), "unknown")
if err == nil || !IsErrNodeNotFound(err) {
if err == nil || !IsErrNotFound(err) {
t.Fatalf("expected a nodeNotFoundError error, got %v", err)
}
}

View File

@ -42,7 +42,7 @@ func TestSecretInspectSecretNotFound(t *testing.T) {
}
_, _, err := client.SecretInspectWithRaw(context.Background(), "unknown")
if err == nil || !IsErrSecretNotFound(err) {
if err == nil || !IsErrNotFound(err) {
t.Fatalf("expected a secretNotFoundError error, got %v", err)
}
}

View File

@ -31,7 +31,7 @@ func TestServiceInspectServiceNotFound(t *testing.T) {
}
_, _, err := client.ServiceInspectWithRaw(context.Background(), "unknown", types.ServiceInspectOptions{})
if err == nil || !IsErrServiceNotFound(err) {
if err == nil || !IsErrNotFound(err) {
t.Fatalf("expected a serviceNotFoundError error, got %v", err)
}
}