Skip to content

Commit 22bf205

Browse files
authored
test: Match cluster namespace to cluster name (#652)
**What problem does this PR solve?**: Matches cluster namespace to cluster name. Thanks to @supershal, who spotted a similar issue in PR #648. **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
1 parent b429404 commit 22bf205

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/handlers/generic/mutation/controlplanevirtualip/inject_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ var _ = Describe("Generate ControlPlane virtual IP patches", func() {
100100
cluster: &clusterv1.Cluster{
101101
ObjectMeta: metav1.ObjectMeta{
102102
Name: request.ClusterName,
103-
Namespace: metav1.NamespaceDefault,
103+
Namespace: request.Namespace,
104104
},
105105
Spec: clusterv1.ClusterSpec{
106106
Topology: &clusterv1.Topology{
@@ -171,7 +171,7 @@ var _ = Describe("Generate ControlPlane virtual IP patches", func() {
171171
cluster: &clusterv1.Cluster{
172172
ObjectMeta: metav1.ObjectMeta{
173173
Name: request.ClusterName,
174-
Namespace: metav1.NamespaceDefault,
174+
Namespace: request.Namespace,
175175
},
176176
Spec: clusterv1.ClusterSpec{
177177
Topology: &clusterv1.Topology{

pkg/handlers/generic/mutation/extraapiservercertsans/inject_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var _ = Describe("Generate Extra API server certificate patches", func() {
7777
cluster: clusterv1.Cluster{
7878
ObjectMeta: metav1.ObjectMeta{
7979
Name: "test-cluster",
80-
Namespace: metav1.NamespaceDefault,
80+
Namespace: request.Namespace,
8181
Labels: map[string]string{
8282
clusterv1.ProviderNameLabel: "aws",
8383
},
@@ -119,7 +119,7 @@ var _ = Describe("Generate Extra API server certificate patches", func() {
119119
cluster: clusterv1.Cluster{
120120
ObjectMeta: metav1.ObjectMeta{
121121
Name: "test-cluster",
122-
Namespace: metav1.NamespaceDefault,
122+
Namespace: request.Namespace,
123123
Labels: map[string]string{
124124
clusterv1.ProviderNameLabel: "docker",
125125
},
@@ -160,7 +160,7 @@ var _ = Describe("Generate Extra API server certificate patches", func() {
160160
cluster: clusterv1.Cluster{
161161
ObjectMeta: metav1.ObjectMeta{
162162
Name: "test-cluster",
163-
Namespace: metav1.NamespaceDefault,
163+
Namespace: request.Namespace,
164164
Labels: map[string]string{
165165
clusterv1.ProviderNameLabel: "nutanix",
166166
},

0 commit comments

Comments
 (0)