(t *testing.T)
| 2513 | } |
| 2514 | |
| 2515 | func TestContainerNoImage(t *testing.T) { |
| 2516 | t.Parallel() |
| 2517 | |
| 2518 | ctx, cancel := testContext(t) |
| 2519 | defer cancel() |
| 2520 | id := t.Name() |
| 2521 | |
| 2522 | client, err := newClient(t, address) |
| 2523 | if err != nil { |
| 2524 | t.Fatal(err) |
| 2525 | } |
| 2526 | defer client.Close() |
| 2527 | |
| 2528 | container, err := client.NewContainer(ctx, id, WithNewSpec()) |
| 2529 | if err != nil { |
| 2530 | t.Fatal(err) |
| 2531 | } |
| 2532 | defer container.Delete(ctx) |
| 2533 | |
| 2534 | _, err = container.Image(ctx) |
| 2535 | if err == nil { |
| 2536 | t.Fatal("error should not be nil when container is created without an image") |
| 2537 | } |
| 2538 | if !errdefs.IsNotFound(err) { |
| 2539 | t.Fatalf("expected error to be %s but received %s", errdefs.ErrNotFound, err) |
| 2540 | } |
| 2541 | } |
| 2542 | |
| 2543 | func TestContainerNoSTDIN(t *testing.T) { |
| 2544 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…