(t *testing.T)
| 77 | } |
| 78 | |
| 79 | func TestNewContainer(t *testing.T) { |
| 80 | t.Parallel() |
| 81 | |
| 82 | id := t.Name() |
| 83 | client, err := newClient(t, address) |
| 84 | if err != nil { |
| 85 | t.Fatal(err) |
| 86 | } |
| 87 | defer client.Close() |
| 88 | |
| 89 | ctx, cancel := testContext(t) |
| 90 | defer cancel() |
| 91 | |
| 92 | container, err := client.NewContainer(ctx, id, WithNewSpec()) |
| 93 | if err != nil { |
| 94 | t.Fatal(err) |
| 95 | } |
| 96 | defer container.Delete(ctx) |
| 97 | if container.ID() != id { |
| 98 | t.Errorf("expected container id %q but received %q", id, container.ID()) |
| 99 | } |
| 100 | if _, err = container.Spec(ctx); err != nil { |
| 101 | t.Fatal(err) |
| 102 | } |
| 103 | if err := container.Delete(ctx); err != nil { |
| 104 | t.Fatal(err) |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | func TestContainerStart(t *testing.T) { |
| 109 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…