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

Adds daemonset conformance tests #60456

Merged
merged 1 commit into from
Mar 1, 2018

Conversation

kow3ns
Copy link
Member

@kow3ns kow3ns commented Feb 26, 2018

What this PR does / why we need it: Adds conformance tests for deamonset

Conformance tests are added for the DaemonSet kinds in the apps/v1 group version. Deprecated versions of DaemonSet will not be tested for conformance, and conformance is only applicable to release 1.10 and later.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 26, 2018
@kow3ns kow3ns requested review from janetkuo and enisoc February 26, 2018 21:18
@@ -108,7 +108,12 @@ var _ = SIGDescribe("Daemon set [Serial]", func() {
Expect(err).NotTo(HaveOccurred())
})

It("should run and stop simple daemon", func() {
/*
Testname: Simple DaemonSet Creation
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if it matters, but the example and all existing Testnames in the repo have no spaces.

https://github.com/kubernetes/kubernetes/blob/master/test/conformance/cf_header.md

@@ -175,6 +185,8 @@ var _ = SIGDescribe("Daemon set [Serial]", func() {
Expect(err).NotTo(HaveOccurred())
})

// We deffer adding this test to conformance pending the disposition of moving DaemonSet scheduling logic to the
Copy link
Member

Choose a reason for hiding this comment

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

Typo: defer

@kow3ns kow3ns force-pushed the ds-conformance branch 2 times, most recently from 7278ddd to 76a9656 Compare February 26, 2018 23:12
@janetkuo janetkuo self-assigned this Feb 27, 2018
/*
Testname: DaemonSet-Creation
Description: A conformant Kubernetes distribution MUST support the creation of DaemonSets. When a DaemonSet
Pod is deleted, the DaemonSet controller MUST recreate the Pod.
Copy link
Member

Choose a reason for hiding this comment

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

nit: we never "recreate" a Pod but simply create a new one.

Copy link
Member Author

Choose a reason for hiding this comment

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

making the distinction makes sense to me

Copy link
Member

Choose a reason for hiding this comment

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

I think this terminology is ok in this case because the pod is associated with the node. The terminology I generally discourage is "reschedule".

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll go with Janet's suggestion because its conformance and someone might infer that we are updating the Pod in place. In general I wouldn't read "recreate" as in place update, but it can't hurt.

It("should retry creating failed daemon pods", func() {
/*
Testname: DaemonSet-FailedPodRecreation
Description: A conformant Kubernetes distribution MUST recreate DaemonSet Pods when they fail.
Copy link
Member

Choose a reason for hiding this comment

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

Same comment here for "recreate" (L238 - L239)

@@ -223,7 +235,11 @@ var _ = SIGDescribe("Daemon set [Serial]", func() {
NotTo(HaveOccurred(), "error waiting for daemon pod to not be running on nodes")
})

It("should retry creating failed daemon pods", func() {
/*
Testname: DaemonSet-FailedPodRecreation
Copy link
Member

Choose a reason for hiding this comment

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

Testname: DaemonSet-FailedPodCreation

Copy link
Member

@janetkuo janetkuo Feb 27, 2018

Choose a reason for hiding this comment

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

Or "Testname: DaemonSet-FailedPodRetryCreation"

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this one reads oddly. It sounds like the Pod is not having fun. :-)

@kow3ns kow3ns force-pushed the ds-conformance branch 2 times, most recently from 3ac3d8f to afedbf9 Compare February 27, 2018 01:12
@bgrant0607
Copy link
Member

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 27, 2018
@bgrant0607
Copy link
Member

I believe all prior comments are now addressed.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 27, 2018
test/e2e/apps/daemon_set.go: "should run and stop complex daemon"
test/e2e/apps/daemon_set.go: "should retry creating failed daemon pods"
test/e2e/apps/daemon_set.go: "Should update pod when spec was updated and update strategy is RollingUpdate"
test/e2e/apps/daemon_set.go: "Should rollback without unnecessary restarts"
Copy link
Member

Choose a reason for hiding this comment

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

Not capitalize "Should" to make it consistent with other tests?

@kow3ns
Copy link
Member Author

kow3ns commented Feb 27, 2018

/restest

@ixdy
Copy link
Member

ixdy commented Feb 27, 2018

/retest

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 28, 2018
@janetkuo
Copy link
Member

janetkuo commented Mar 1, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 1, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bgrant0607, janetkuo, kow3ns

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 52077, 60456, 60591). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 5520e07 into kubernetes:master Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants