-
Notifications
You must be signed in to change notification settings - Fork 719
Open
Labels
area/cie.g., CI failuree.g., CI failuregood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
All the tests using testutil.NewBase should be rewritten to use nerdtest.Setup (i.e., Tigron framework)
https://github.com/search?q=repo%3Acontainerd%2Fnerdctl%20testutil.NewBase&type=code
https://github.com/search?q=repo%3Acontainerd%2Fnerdctl+nerdtest.Setup&type=code
Example occurrence:
nerdctl/cmd/nerdctl/container/container_list_test.go
Lines 27 to 62 in 1d69ed9
| // https://github.com/containerd/nerdctl/issues/2598 | |
| func TestContainerListWithFormatLabel(t *testing.T) { | |
| t.Parallel() | |
| base := testutil.NewBase(t) | |
| tID := testutil.Identifier(t) | |
| cID := tID | |
| labelK := "label-key-" + tID | |
| labelV := "label-value-" + tID | |
| base.Cmd("run", "-d", | |
| "--name", cID, | |
| "--label", labelK+"="+labelV, | |
| testutil.CommonImage, "sleep", nerdtest.Infinity).AssertOK() | |
| defer base.Cmd("rm", "-f", cID).AssertOK() | |
| base.Cmd("ps", "-a", | |
| "--filter", "label="+labelK, | |
| "--format", fmt.Sprintf("{{.Label %q}}", labelK)).AssertOutExactly(labelV + "\n") | |
| } | |
| func TestContainerListWithJsonFormatLabel(t *testing.T) { | |
| t.Parallel() | |
| base := testutil.NewBase(t) | |
| tID := testutil.Identifier(t) | |
| cID := tID | |
| labelK := "label-key-" + tID | |
| labelV := "label-value-" + tID | |
| base.Cmd("run", "-d", | |
| "--name", cID, | |
| "--label", labelK+"="+labelV, | |
| testutil.CommonImage, "sleep", nerdtest.Infinity).AssertOK() | |
| defer base.Cmd("rm", "-f", cID).AssertOK() | |
| base.Cmd("ps", "-a", | |
| "--filter", "label="+labelK, | |
| "--format", "json").AssertOutContains(fmt.Sprintf("%s=%s", labelK, labelV)) | |
| } |
Example PR:
This is a "good first issue", but needs a bunch of PRs.
Files (46)
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose/compose_create_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose/compose_down_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose/compose_kill_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose/compose_pause_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose/compose_port_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose/compose_ps_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose/compose_pull_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose/compose_restart_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose/compose_run_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose/compose_up_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_cp_acid_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_cp_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_create_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_exec_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_exec_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_inspect_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_inspect_windows_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_kill_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_list_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_list_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_list_windows_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_remove_windows_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_rename_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_rename_windows_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_restart_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_cgroup_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_log_driver_syslog_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_mount_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_mount_windows_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_network_base_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_network_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_network_windows_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_restart_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_runtime_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_security_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_systemd_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_user_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_user_windows_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_run_windows_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_start_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_stop_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/container_update_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/container/multi_platform_linux_test.go
- https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/login/login_linux_test.go
Metadata
Metadata
Assignees
Labels
area/cie.g., CI failuree.g., CI failuregood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed