Skip to content

Commit

Permalink
Chores: spurious comments and syntax simplification
Browse files Browse the repository at this point in the history
Signed-off-by: apostasie <[email protected]>
  • Loading branch information
apostasie committed Oct 17, 2024
1 parent 19fb431 commit 32860f6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 20 deletions.
8 changes: 1 addition & 7 deletions cmd/nerdctl/network/network_create_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ func TestNetworkCreate(t *testing.T) {
testCase.SubTests = []*test.Case{
{
Description: "vanilla",
// #3491 and #3508 may have helped - commenting this out for now
// Require: nerdtest.IsFlaky("https://github.com/containerd/nerdctl/issues/3086"),
Setup: func(data test.Data, helpers test.Helpers) {
helpers.Ensure("network", "create", data.Identifier())
netw := nerdtest.InspectNetwork(helpers, data.Identifier())
Expand Down Expand Up @@ -66,8 +64,6 @@ func TestNetworkCreate(t *testing.T) {
},
{
Description: "with MTU",
// #3491 and #3508 may have helped - commenting this out for now
// Require: nerdtest.IsFlaky("https://github.com/containerd/nerdctl/issues/3086"),
Setup: func(data test.Data, helpers test.Helpers) {
helpers.Ensure("network", "create", data.Identifier(), "--driver", "bridge", "--opt", "com.docker.network.driver.mtu=9216")
},
Expand All @@ -81,9 +77,7 @@ func TestNetworkCreate(t *testing.T) {
},
{
Description: "with ipv6",
// #3491 and #3508 may have helped - commenting this out for now
// Require: nerdtest.IsFlaky("https://github.com/containerd/nerdctl/issues/3086"),
Require: nerdtest.OnlyIPv6,
Require: nerdtest.OnlyIPv6,
Setup: func(data test.Data, helpers test.Helpers) {
subnetStr := "2001:db8:8::/64"
data.Set("subnetStr", subnetStr)
Expand Down
3 changes: 0 additions & 3 deletions cmd/nerdctl/network/network_list_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ import (
func TestNetworkLsFilter(t *testing.T) {
testCase := nerdtest.Setup()

// #3491 and #3508 may have helped - commenting this out for now
// testCase.Require = nerdtest.IsFlaky("https://github.com/containerd/nerdctl/issues/3086"),

testCase.Setup = func(data test.Data, helpers test.Helpers) {
data.Set("identifier", data.Identifier())
data.Set("label", "mylabel=label-1")
Expand Down
3 changes: 0 additions & 3 deletions pkg/cmd/image/ensure.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ func ensureOne(ctx context.Context, client *containerd.Client, rawRef string, ta
if err != nil {
return err
}
// if platform == nil {
// platform = platforms.DefaultSpec()
//}
pltf := []ocispec.Platform{platform}
platformComparer := platformutil.NewMatchComparerFromOCISpecPlatformSlice(pltf)

Expand Down
9 changes: 2 additions & 7 deletions pkg/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ func (b *Base) EnsureDaemonActive() {
sleep = 3 * time.Second
)
for i := 0; i < maxRetry; i++ {
cmd := exec.Command("systemctl",
append(systemctlArgs,
[]string{"is-active", target}...)...)
cmd := exec.Command("systemctl", append(systemctlArgs, "is-active", target)...)
out, err := cmd.CombinedOutput()
b.T.Logf("(retry=%d) %s", i, string(out))
if err == nil {
Expand All @@ -204,10 +202,7 @@ func (b *Base) DumpDaemonLogs(minutes int) {
b.T.Helper()
target := b.systemctlTarget()
cmd := exec.Command("journalctl",
append(b.systemctlArgs(),
[]string{"-u", target,
"--no-pager",
"-S", fmt.Sprintf("%d min ago", minutes)}...)...)
append(b.systemctlArgs(), "-u", target, "--no-pager", "-S", fmt.Sprintf("%d min ago", minutes))...)
b.T.Logf("===== %v =====", cmd.Args)
out, err := cmd.CombinedOutput()
if err != nil {
Expand Down

0 comments on commit 32860f6

Please sign in to comment.