(t *testing.T)
| 368 | } |
| 369 | |
| 370 | func TestRunFlagsParseWithMemory(t *testing.T) { |
| 371 | flags, _ := setupRunFlags() |
| 372 | args := []string{"--memory=invalid", "img", "cmd"} |
| 373 | err := flags.Parse(args) |
| 374 | assert.ErrorContains(t, err, `invalid argument "invalid" for "-m, --memory" flag`) |
| 375 | |
| 376 | _, hostconfig, _ := mustParse(t, "--memory=1G") |
| 377 | assert.Check(t, is.Equal(int64(1073741824), hostconfig.Memory)) |
| 378 | } |
| 379 | |
| 380 | func TestParseWithMemorySwap(t *testing.T) { |
| 381 | flags, _ := setupRunFlags() |
nothing calls this directly
no test coverage detected
searching dependent graphs…