Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
| ... | ... |
@@ -60,16 +60,8 @@ func TestVolumeCreate(t *testing.T) {
|
| 60 | 60 |
"opt-key": "opt-value", |
| 61 | 61 |
}, |
| 62 | 62 |
}) |
| 63 |
- if err != nil {
|
|
| 64 |
- t.Fatal(err) |
|
| 65 |
- } |
|
| 66 |
- if vol.Name != "volume" {
|
|
| 67 |
- t.Fatalf("expected volume.Name to be 'volume', got %s", vol.Name)
|
|
| 68 |
- } |
|
| 69 |
- if vol.Driver != "local" {
|
|
| 70 |
- t.Fatalf("expected volume.Driver to be 'local', got %s", vol.Driver)
|
|
| 71 |
- } |
|
| 72 |
- if vol.Mountpoint != "mountpoint" {
|
|
| 73 |
- t.Fatalf("expected volume.Mountpoint to be 'mountpoint', got %s", vol.Mountpoint)
|
|
| 74 |
- } |
|
| 63 |
+ assert.NilError(t, err) |
|
| 64 |
+ assert.Check(t, is.Equal(vol.Name, "volume")) |
|
| 65 |
+ assert.Check(t, is.Equal(vol.Driver, "local")) |
|
| 66 |
+ assert.Check(t, is.Equal(vol.Mountpoint, "mountpoint")) |
|
| 75 | 67 |
} |
| ... | ... |
@@ -81,11 +81,7 @@ func TestVolumeList(t *testing.T) {
|
| 81 | 81 |
} |
| 82 | 82 |
|
| 83 | 83 |
volumeResponse, err := client.VolumeList(context.Background(), volume.ListOptions{Filters: listCase.filters})
|
| 84 |
- if err != nil {
|
|
| 85 |
- t.Fatal(err) |
|
| 86 |
- } |
|
| 87 |
- if len(volumeResponse.Volumes) != 1 {
|
|
| 88 |
- t.Fatalf("expected 1 volume, got %v", volumeResponse.Volumes)
|
|
| 89 |
- } |
|
| 84 |
+ assert.NilError(t, err) |
|
| 85 |
+ assert.Check(t, is.Len(volumeResponse.Volumes, 1)) |
|
| 90 | 86 |
} |
| 91 | 87 |
} |