mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 23:03:40 +00:00
Generate HTTP request fixtures for dynamic client tests.
This commit is contained in:
parent
a803c8034d
commit
e335b8e81b
@ -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 (
|
||||
|
2
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/.gitattributes
vendored
Normal file
2
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# disable end-of-line conversion for fixtures
|
||||
* -text
|
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/apply
vendored
Executable file
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/apply
vendored
Executable file
@ -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"}}
|
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/applystatus
vendored
Executable file
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/applystatus
vendored
Executable file
@ -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"}}
|
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/create
vendored
Executable file
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/create
vendored
Executable file
@ -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"}}
|
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/delete
vendored
Executable file
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/delete
vendored
Executable file
@ -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"]}
|
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/deletecollection
vendored
Executable file
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/deletecollection
vendored
Executable file
@ -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"]}
|
6
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/get
vendored
Executable file
6
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/get
vendored
Executable file
@ -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
|
||||
|
6
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/list
vendored
Executable file
6
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/list
vendored
Executable file
@ -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
|
||||
|
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/patch
vendored
Executable file
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/patch
vendored
Executable file
@ -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"}
|
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/update
vendored
Executable file
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/update
vendored
Executable file
@ -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"}}
|
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/updatestatus
vendored
Executable file
9
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/updatestatus
vendored
Executable file
@ -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"}}
|
6
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/watch
vendored
Executable file
6
staging/src/k8s.io/client-go/dynamic/testdata/TestGoldenRequest/watch
vendored
Executable file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user