From f92137ab06f3f8db0a4943ae2ed6f0acfb89040f Mon Sep 17 00:00:00 2001 From: Barni S Date: Mon, 26 Aug 2024 19:00:04 -0400 Subject: [PATCH] Remove TestSimpleCompositionCreate - This test was useful at the begining when composition create was failing. - Now code is mature and all other tests cover this aspect --- .../TestSimpleCompositionCreate/input.yaml | 84 ------------------- .../TestSimpleCompositionCreate/output.yaml | 14 ---- .../tests/testcases/simple_test.go | 7 -- 3 files changed, 105 deletions(-) delete mode 100644 experiments/compositions/composition/tests/data/TestSimpleCompositionCreate/input.yaml delete mode 100644 experiments/compositions/composition/tests/data/TestSimpleCompositionCreate/output.yaml diff --git a/experiments/compositions/composition/tests/data/TestSimpleCompositionCreate/input.yaml b/experiments/compositions/composition/tests/data/TestSimpleCompositionCreate/input.yaml deleted file mode 100644 index ffa1972ac0..0000000000 --- a/experiments/compositions/composition/tests/data/TestSimpleCompositionCreate/input.yaml +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 2024 Google LLC -# -# 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. - - -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: pconfigs.facade.foocorp.com -spec: - group: facade.foocorp.com - names: - kind: PConfig - listKind: PConfigList - plural: pconfigs - singular: pconfig - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Schema for the pconfig - properties: - apiVersion: - description: api-version of api - type: string - kind: - description: gvk Kind - type: string - metadata: - type: object - spec: - description: PConfig spec - properties: - project: - type: string - required: - - project - type: object - status: - description: PConfig status - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: composition.google.com/v1alpha1 -kind: Composition -metadata: - name: projectconfigmap - namespace: default -spec: - inputAPIGroup: pconfigs.facade.foocorp.com - expanders: - - type: jinja2 - name: project - template: | - {% set hostProject = 'compositions-foobar' %} - {% set managedProject = pconfigs.spec.project %} - apiVersion: v1 - kind: ConfigMap - metadata: - name: {{ managedProject }} - namespace: {{ pconfigs.metadata.namespace }} - labels: - createdby: "composition-namespaceconfigmap" - data: - name: {{ managedProject }} - billingAccountRef: - external: "010101-ABABCD-BCAB11" - folderRef: - external: "000000111100" \ No newline at end of file diff --git a/experiments/compositions/composition/tests/data/TestSimpleCompositionCreate/output.yaml b/experiments/compositions/composition/tests/data/TestSimpleCompositionCreate/output.yaml deleted file mode 100644 index fc042a9bb7..0000000000 --- a/experiments/compositions/composition/tests/data/TestSimpleCompositionCreate/output.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2024 Google LLC -# -# 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. - diff --git a/experiments/compositions/composition/tests/testcases/simple_test.go b/experiments/compositions/composition/tests/testcases/simple_test.go index 568a1dd848..26e0d845fb 100644 --- a/experiments/compositions/composition/tests/testcases/simple_test.go +++ b/experiments/compositions/composition/tests/testcases/simple_test.go @@ -23,13 +23,6 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) -func TestSimpleCompositionCreate(t *testing.T) { - //t.Parallel() - s := scenario.NewBasic(t) - defer s.Cleanup() - s.Setup() -} - func TestSimpleExpansionJob(t *testing.T) { //t.Parallel() s := scenario.NewBasic(t)