diff --git a/dynamic/golden_test.go b/dynamic/golden_test.go index 20bede85..2ae6dfc6 100644 --- a/dynamic/golden_test.go +++ b/dynamic/golden_test.go @@ -1,3 +1,19 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package dynamic_test import ( diff --git a/dynamic/testdata/TestGoldenRequest/apply b/dynamic/testdata/TestGoldenRequest/apply new file mode 100755 index 00000000..9f6385a7 --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/apply @@ -0,0 +1,9 @@ +PATCH /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin?force=true HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +Content-Length: 29 +Content-Type: application/apply-patch+yaml +User-Agent: TestGoldenRequest + +{"metadata":{"name":"mips"}} diff --git a/dynamic/testdata/TestGoldenRequest/applystatus b/dynamic/testdata/TestGoldenRequest/applystatus new file mode 100755 index 00000000..ce69f166 --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/applystatus @@ -0,0 +1,9 @@ +PATCH /apis/flops/v1alpha1/namespaces/mops/flips/mips/status?force=true HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +Content-Length: 29 +Content-Type: application/apply-patch+yaml +User-Agent: TestGoldenRequest + +{"metadata":{"name":"mips"}} diff --git a/dynamic/testdata/TestGoldenRequest/create b/dynamic/testdata/TestGoldenRequest/create new file mode 100755 index 00000000..5a742e1c --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/create @@ -0,0 +1,9 @@ +POST /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin?fieldValidation=warn HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +Content-Length: 29 +Content-Type: application/json +User-Agent: TestGoldenRequest + +{"metadata":{"name":"mips"}} diff --git a/dynamic/testdata/TestGoldenRequest/delete b/dynamic/testdata/TestGoldenRequest/delete new file mode 100755 index 00000000..b1622968 --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/delete @@ -0,0 +1,9 @@ +DELETE /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +Content-Length: 60 +Content-Type: application/json +User-Agent: TestGoldenRequest + +{"kind":"DeleteOptions","apiVersion":"v1","dryRun":["All"]} diff --git a/dynamic/testdata/TestGoldenRequest/deletecollection b/dynamic/testdata/TestGoldenRequest/deletecollection new file mode 100755 index 00000000..8e9a2437 --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/deletecollection @@ -0,0 +1,9 @@ +DELETE /apis/flops/v1alpha1/namespaces/mops/flips?resourceVersion=42 HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +Content-Length: 60 +Content-Type: application/json +User-Agent: TestGoldenRequest + +{"kind":"DeleteOptions","apiVersion":"v1","dryRun":["All"]} diff --git a/dynamic/testdata/TestGoldenRequest/get b/dynamic/testdata/TestGoldenRequest/get new file mode 100755 index 00000000..d7e78a8a --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/get @@ -0,0 +1,6 @@ +GET /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin?resourceVersion=42 HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +User-Agent: TestGoldenRequest + diff --git a/dynamic/testdata/TestGoldenRequest/list b/dynamic/testdata/TestGoldenRequest/list new file mode 100755 index 00000000..68e673f1 --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/list @@ -0,0 +1,6 @@ +GET /apis/flops/v1alpha1/namespaces/mops/flips?resourceVersion=42 HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +User-Agent: TestGoldenRequest + diff --git a/dynamic/testdata/TestGoldenRequest/patch b/dynamic/testdata/TestGoldenRequest/patch new file mode 100755 index 00000000..4b607065 --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/patch @@ -0,0 +1,9 @@ +PATCH /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin?fieldManager=baz HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +Content-Length: 14 +Content-Type: application/strategic-merge-patch+json +User-Agent: TestGoldenRequest + +{"foo":"bar"} diff --git a/dynamic/testdata/TestGoldenRequest/update b/dynamic/testdata/TestGoldenRequest/update new file mode 100755 index 00000000..5d8e7021 --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/update @@ -0,0 +1,9 @@ +PUT /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin?fieldValidation=warn HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +Content-Length: 29 +Content-Type: application/json +User-Agent: TestGoldenRequest + +{"metadata":{"name":"mips"}} diff --git a/dynamic/testdata/TestGoldenRequest/updatestatus b/dynamic/testdata/TestGoldenRequest/updatestatus new file mode 100755 index 00000000..9c2724e3 --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/updatestatus @@ -0,0 +1,9 @@ +PUT /apis/flops/v1alpha1/namespaces/mops/flips/mips/status?fieldValidation=warn HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +Content-Length: 29 +Content-Type: application/json +User-Agent: TestGoldenRequest + +{"metadata":{"name":"mips"}} diff --git a/dynamic/testdata/TestGoldenRequest/watch b/dynamic/testdata/TestGoldenRequest/watch new file mode 100755 index 00000000..8436fb77 --- /dev/null +++ b/dynamic/testdata/TestGoldenRequest/watch @@ -0,0 +1,6 @@ +GET /apis/flops/v1alpha1/namespaces/mops/flips?resourceVersion=42&watch=true HTTP/1.1 +Host: example.com +Accept: application/json +Accept-Encoding: gzip +User-Agent: TestGoldenRequest +