Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part 5: tests #3550

Merged
merged 3 commits into from
Oct 18, 2024
Merged

Part 5: tests #3550

merged 3 commits into from
Oct 18, 2024

Conversation

apostasie
Copy link
Contributor

Broken out of #3535

@apostasie apostasie mentioned this pull request Oct 15, 2024
Comment on lines +38 to +45
nerdtest.KubeCtlCommand(helpers, "run", "--image", testutil.CommonImage, data.Identifier(), "--", "sleep", "Inf").Run(&test.Expected{})
nerdtest.KubeCtlCommand(helpers, "wait", "pod", data.Identifier(), "--for=condition=ready", "--timeout=1m").Run(&test.Expected{})
nerdtest.KubeCtlCommand(helpers, "exec", data.Identifier(), "--", "mkdir", "-p", "/tmp/whatever").Run(&test.Expected{})
nerdtest.KubeCtlCommand(helpers, "get", "pods", data.Identifier(), "-o", "jsonpath={ .status.containerStatuses[0].containerID }").Run(&test.Expected{
Output: func(stdout string, info string, t *testing.T) {
containerID = strings.TrimPrefix(stdout, "containerd://")
},
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need to specify the namespace nerdctl-test-k8s explicitly?

Copy link
Contributor Author

@apostasie apostasie Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary per-se, but was asked for when the k8s env was introduced: #3296 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary per-se

will these commands be run in the default namespace or in nerdctl-test-k8s?

Copy link
Contributor Author

@apostasie apostasie Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k8s namespaces are not the same as containerd namespaces (yeah, really confusing).

Commands run by nerdctl for this environment are run inside the k8s.io containerd namespace (instead of the nerdctl-test usual namespace).

Then nerdctl-test-k8s is a k8 namespace, unrelated.

@AkihiroSuda AkihiroSuda added the area/ci e.g., CI failure label Oct 15, 2024
@apostasie apostasie changed the title Part5 tests Part 5: tests Oct 15, 2024
This was referenced Oct 16, 2024
@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone Oct 16, 2024
@AkihiroSuda AkihiroSuda requested a review from djdongjin October 16, 2024 07:02
@apostasie
Copy link
Contributor Author

apostasie commented Oct 16, 2024

@djdongjin I am commenting out this with the latest push https://github.com/containerd/nerdctl/compare/92b6ebc138b6d7258692b0f72541a90ba00714c4..6ddb9ec0a700068bbc2233bf011a1184a1a8c1e2

Otherwise, must-retry-tests will not be run until we merge #3535 (which this PR has been broken out of by maintainers request, as it was deemed too big).
Both these PRs do have dependencies though - this will get uncommented again for #3535

@apostasie
Copy link
Contributor Author

Rebased.

@apostasie
Copy link
Contributor Author

Folks, breaking out some changes in separate PRs:

Will rebase on merge.

@apostasie apostasie force-pushed the part5-tests branch 3 times, most recently from 32860f6 to fbde334 Compare October 18, 2024 04:29
@apostasie
Copy link
Contributor Author

Rebased.

Marking legacy tests as flaky will be done in #3535 instead.

We are left here with kube tests and tooling cleanups, registry tooling cleanup, and "commit" tests rewrite.

@apostasie
Copy link
Contributor Author

Rebased.

containerID := ""
// NOTE: kubectl namespaces are not the same as containerd namespaces.
// We still want kube test objects segregated in their own Kube API namespace.
nerdtest.KubeCtlCommand(helpers, "create", "namespace", "nerdctl-test-k8s").Run(&test.Expected{})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nerdctl-test-k8s should a constant

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit dbcc3bc into containerd:main Oct 18, 2024
23 checks passed
@apostasie
Copy link
Contributor Author

Thanks @djdongjin and @AkihiroSuda .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci e.g., CI failure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants