Make UpdateExpectedFromActual work with hierarchical testdata directories

This commit is contained in:
Katrina Verey
2021-07-15 16:40:18 -07:00
parent 0537b59f27
commit c5adafd9ce
7 changed files with 361 additions and 130 deletions

View File

@@ -0,0 +1,7 @@
# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
apiVersion: example.com/v1alpha1
kind: Demo
spec:
value: a

View File

@@ -0,0 +1,16 @@
# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-1
annotations:
updated: "true"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-2
annotations:
updated: "true"

View File

@@ -0,0 +1,16 @@
# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-1
annotations:
baz: foo
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-2
annotations:
foo: bar

View File

@@ -0,0 +1,20 @@
apiVersion:
kind: ResourceList
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: test-1
annotations:
updated: "true"
- apiVersion: apps/v1
kind: Deployment
metadata:
name: test-2
annotations:
updated: "true"
functionConfig:
apiVersion: example.com/v1alpha1
kind: Demo
spec:
value: a

View File

@@ -0,0 +1,22 @@
# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
kind: ResourceList
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: test-1
annotations:
baz: foo
- apiVersion: apps/v1
kind: Deployment
metadata:
name: test-2
annotations:
foo: bar
functionConfig:
apiVersion: example.com/v1alpha1
kind: Demo
spec:
value: a