Skip to content

Commit 47b06b5

Browse files
committed
test(admission): drop TestEscapeJSONPointer
The function lives in cocoon-common and is already covered by k8s/admission/admission_test.go:TestEscapeJSONPointer there. No reason to mirror the test in the webhook package.
1 parent 6bcbd81 commit 47b06b5

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

admission/pod_mutator_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"k8s.io/apimachinery/pkg/runtime"
1111
"k8s.io/client-go/kubernetes/fake"
1212

13-
commonadmission "github.com/cocoonstack/cocoon-common/k8s/admission"
1413
"github.com/cocoonstack/cocoon-common/meta"
1514
)
1615

@@ -63,19 +62,6 @@ func TestPodNodePoolPrecedence(t *testing.T) {
6362
}
6463
}
6564

66-
func TestEscapeJSONPointer(t *testing.T) {
67-
cases := map[string]string{
68-
"vm.cocoonstack.io/name": "vm.cocoonstack.io~1name",
69-
"a/b~c": "a~1b~0c",
70-
"plain": "plain",
71-
}
72-
for in, want := range cases {
73-
if got := commonadmission.EscapeJSONPointer(in); got != want {
74-
t.Errorf("escape %q = %q, want %q", in, got, want)
75-
}
76-
}
77-
}
78-
7965
func TestMutatePodAllowsNonCocoonPod(t *testing.T) {
8066
srv := newTestServer(t)
8167
pod := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "p", Namespace: "ns"}}

0 commit comments

Comments
 (0)