-
Notifications
You must be signed in to change notification settings - Fork 1.2k
test(kubeclient): add daemonset namespace mismatch case #5775
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,6 +69,13 @@ var _ = Describe("Test Daemonset", func() { | |
| Expect(err).To(HaveOccurred()) | ||
| Expect(apierrs.IsNotFound(err)).To(BeTrue()) | ||
| }) | ||
|
|
||
| It("Should fail to get the daemonset when namespace does not match", func() { | ||
| fakeClient := fake.NewFakeClientWithScheme(testScheme, objs...) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test asserts |
||
| _, err := GetDaemonset(fakeClient, name, "another-namespace") | ||
| Expect(err).To(HaveOccurred()) | ||
| Expect(apierrs.IsNotFound(err)).To(BeTrue()) | ||
| }) | ||
| }) | ||
|
|
||
| Context("Test UpdateDaemonSetUpdateStrategy", func() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor naming suggestion: "another-namespace" works fine functionally, but something like "wrong-namespace" or "nonexistent-namespace" would make the intent immediately obvious to anyone scanning the test file.