Skip to content

Commit

Permalink
Merge pull request #3757 from vincepri/patchtestnamespace
Browse files Browse the repository at this point in the history
🐛 util/patch tests shouldn't use a non-existent namespace
  • Loading branch information
k8s-ci-robot authored Oct 7, 2020
2 parents fb5b8e9 + b39f29e commit a7690b7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions util/patch/patch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ var _ = Describe("Patch Helper", func() {
obj := &clusterv1.Cluster{
ObjectMeta: metav1.ObjectMeta{
GenerateName: "test-",
Namespace: "test-namespace",
Namespace: "default",
},
}

Expand Down Expand Up @@ -481,7 +481,7 @@ var _ = Describe("Patch Helper", func() {

Specify("updating spec", func() {
obj := obj.DeepCopy()
obj.ObjectMeta.Namespace = "test-namespace"
obj.ObjectMeta.Namespace = "default"

By("Creating the object")
Expect(testEnv.Create(ctx, obj)).ToNot(HaveOccurred())
Expand All @@ -499,7 +499,7 @@ var _ = Describe("Patch Helper", func() {
obj.Spec.InfrastructureRef = &corev1.ObjectReference{
Kind: "test-kind",
Name: "test-ref",
Namespace: "test-namespace",
Namespace: "default",
}

By("Patching the object")
Expand Down Expand Up @@ -549,7 +549,7 @@ var _ = Describe("Patch Helper", func() {

Specify("updating both spec, status, and adding a condition", func() {
obj := obj.DeepCopy()
obj.ObjectMeta.Namespace = "test-namespace"
obj.ObjectMeta.Namespace = "default"

By("Creating the object")
Expect(testEnv.Create(ctx, obj)).ToNot(HaveOccurred())
Expand All @@ -567,7 +567,7 @@ var _ = Describe("Patch Helper", func() {
obj.Spec.InfrastructureRef = &corev1.ObjectReference{
Kind: "test-kind",
Name: "test-ref",
Namespace: "test-namespace",
Namespace: "default",
}

By("Updating the object status")
Expand Down Expand Up @@ -597,7 +597,7 @@ var _ = Describe("Patch Helper", func() {
obj := &clusterv1.MachineSet{
ObjectMeta: metav1.ObjectMeta{
GenerateName: "test-ms",
Namespace: "test-namespace",
Namespace: "default",
},
Spec: clusterv1.MachineSetSpec{
ClusterName: "test1",
Expand Down

0 comments on commit a7690b7

Please sign in to comment.