The tests in apply_test follows the general pattern of other tests. We load from a file in test/fixtures and mock the API server in the function closure in the HttpClient call. In PATCH request rount-tripper we check that the kubectl apply implementation worked as expected. References #40841
8 lines
131 B
YAML
8 lines
131 B
YAML
apiVersion: "unit-test.test.com/v1"
|
|
kind: Widget
|
|
metadata:
|
|
name: "widget"
|
|
namespace: "test"
|
|
labels:
|
|
foo: bar
|
|
key: "value" |