Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
| ... | ... |
@@ -60,10 +60,6 @@ func TestConfigCreate(t *testing.T) {
|
| 60 | 60 |
} |
| 61 | 61 |
|
| 62 | 62 |
r, err := client.ConfigCreate(context.Background(), swarm.ConfigSpec{})
|
| 63 |
- if err != nil {
|
|
| 64 |
- t.Fatal(err) |
|
| 65 |
- } |
|
| 66 |
- if r.ID != "test_config" {
|
|
| 67 |
- t.Fatalf("expected `test_config`, got %s", r.ID)
|
|
| 68 |
- } |
|
| 63 |
+ assert.NilError(t, err) |
|
| 64 |
+ assert.Check(t, is.Equal(r.ID, "test_config")) |
|
| 69 | 65 |
} |
| ... | ... |
@@ -92,10 +92,6 @@ func TestConfigInspect(t *testing.T) {
|
| 92 | 92 |
} |
| 93 | 93 |
|
| 94 | 94 |
configInspect, _, err := client.ConfigInspectWithRaw(context.Background(), "config_id") |
| 95 |
- if err != nil {
|
|
| 96 |
- t.Fatal(err) |
|
| 97 |
- } |
|
| 98 |
- if configInspect.ID != "config_id" {
|
|
| 99 |
- t.Fatalf("expected `config_id`, got %s", configInspect.ID)
|
|
| 100 |
- } |
|
| 95 |
+ assert.NilError(t, err) |
|
| 96 |
+ assert.Check(t, is.Equal(configInspect.ID, "config_id")) |
|
| 101 | 97 |
} |
| ... | ... |
@@ -95,11 +95,7 @@ func TestConfigList(t *testing.T) {
|
| 95 | 95 |
} |
| 96 | 96 |
|
| 97 | 97 |
configs, err := client.ConfigList(context.Background(), listCase.options) |
| 98 |
- if err != nil {
|
|
| 99 |
- t.Fatal(err) |
|
| 100 |
- } |
|
| 101 |
- if len(configs) != 2 {
|
|
| 102 |
- t.Fatalf("expected 2 configs, got %v", configs)
|
|
| 103 |
- } |
|
| 98 |
+ assert.NilError(t, err) |
|
| 99 |
+ assert.Check(t, is.Len(configs, 2)) |
|
| 104 | 100 |
} |
| 105 | 101 |
} |