Skip to content

Commit

Permalink
Remove test: webhook no longer creates consul-sidecar
Browse files Browse the repository at this point in the history
  • Loading branch information
curtbushko committed Oct 19, 2022
1 parent 2ebf39a commit 09c0e45
Showing 1 changed file with 0 additions and 79 deletions.
79 changes: 0 additions & 79 deletions control-plane/connect-inject/mesh_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,85 +573,6 @@ func TestHandlerHandle(t *testing.T) {
},
},
},

{
"when metrics merging is enabled, we should inject the consul-sidecar and add prometheus annotations",
MeshWebhook{
Log: logrtest.TestLogger{T: t},
AllowK8sNamespacesSet: mapset.NewSetWith("*"),
DenyK8sNamespacesSet: mapset.NewSet(),
MetricsConfig: MetricsConfig{
DefaultEnableMetrics: true,
DefaultEnableMetricsMerging: true,
},
decoder: decoder,
Clientset: defaultTestClientWithNamespace(),
},
admission.Request{
AdmissionRequest: admissionv1.AdmissionRequest{
Namespace: namespaces.DefaultNamespace,
Object: encodeRaw(t, &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
"testLabel": "123",
},
Annotations: map[string]string{
annotationServiceMetricsPort: "1234",
},
},
Spec: basicSpec,
}),
},
},
"",
[]jsonpatch.Operation{
{
Operation: "add",
Path: "/spec/volumes",
},
{
Operation: "add",
Path: "/spec/initContainers",
},
{
Operation: "add",
Path: "/spec/containers/1",
},
{
Operation: "add",
Path: "/spec/containers/2",
},
{
Operation: "add",
Path: "/metadata/annotations/" + escapeJSONPointer(keyInjectStatus),
},
{
Operation: "add",
Path: "/metadata/annotations/" + escapeJSONPointer(annotationOriginalPod),
},
{
Operation: "add",
Path: "/metadata/annotations/" + escapeJSONPointer(annotationPrometheusScrape),
},
{
Operation: "add",
Path: "/metadata/annotations/" + escapeJSONPointer(annotationPrometheusPath),
},
{
Operation: "add",
Path: "/metadata/annotations/" + escapeJSONPointer(annotationPrometheusPort),
},
{
Operation: "add",
Path: "/metadata/labels/" + escapeJSONPointer(keyInjectStatus),
},
{
Operation: "add",
Path: "/metadata/labels/" + escapeJSONPointer(keyManagedBy),
},
},
},

{
"tproxy with overwriteProbes is enabled",
MeshWebhook{
Expand Down

0 comments on commit 09c0e45

Please sign in to comment.