Generate HTTP request fixtures for dynamic client tests.

This commit is contained in:
Ben Luddy 2024-04-16 12:49:15 -04:00
parent a803c8034d
commit e335b8e81b
No known key found for this signature in database
GPG Key ID: A6551E73A5974C30
13 changed files with 108 additions and 0 deletions

View File

@ -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 package dynamic_test
import ( import (

View File

@ -0,0 +1,2 @@
# disable end-of-line conversion for fixtures
* -text

View 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"}}

View 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"}}

View 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"}}

View 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"]}

View 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"]}

View 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

View 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

View 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"}

View 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"}}

View 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"}}

View 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