From f96f9d7eae10484a26aba4d129183ba9670f476c Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Wed, 9 Nov 2022 00:13:53 +0200 Subject: [PATCH] add test templates --- .gitignore | 1 + library/common-test/Chart.yaml | 10 +++++++++ library/common-test/ci/basic-values.yaml | 0 library/common-test/templates/common.yaml | 1 + library/common-test/tests/f-test.yaml | 12 +++++++++++ library/common/1.0.0/Chart.yaml | 26 +++++++++++++++++++++++ library/common/1.0.0/values.yaml | 2 ++ 7 files changed, 52 insertions(+) create mode 100644 library/common-test/Chart.yaml create mode 100644 library/common-test/ci/basic-values.yaml create mode 100644 library/common-test/templates/common.yaml create mode 100644 library/common-test/tests/f-test.yaml create mode 100644 library/common/1.0.0/Chart.yaml diff --git a/.gitignore b/.gitignore index 800c4971..01eed6ca 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ npm-debug.log tests/artifacts/ tests/test-report.txt tests/test-report.xml +__snapshot__/ diff --git a/library/common-test/Chart.yaml b/library/common-test/Chart.yaml new file mode 100644 index 00000000..080ddf02 --- /dev/null +++ b/library/common-test/Chart.yaml @@ -0,0 +1,10 @@ +name: common-test +version: 1.0.0 +apiVersion: v2 +appVersion: v1.0.0 +kubeVersion: '>=1.16.0-0' +type: application +dependencies: + - name: common + repository: file://../common/1.0.0 + version: 1.0.0 diff --git a/library/common-test/ci/basic-values.yaml b/library/common-test/ci/basic-values.yaml new file mode 100644 index 00000000..e69de29b diff --git a/library/common-test/templates/common.yaml b/library/common-test/templates/common.yaml new file mode 100644 index 00000000..00b8b4c4 --- /dev/null +++ b/library/common-test/templates/common.yaml @@ -0,0 +1 @@ +name: {{ include "ix.v1.common.names.fqdn.cluster" . }} diff --git a/library/common-test/tests/f-test.yaml b/library/common-test/tests/f-test.yaml new file mode 100644 index 00000000..c91824fe --- /dev/null +++ b/library/common-test/tests/f-test.yaml @@ -0,0 +1,12 @@ +suite: test +templates: + - common.yaml +tests: + - it: default should pass + asserts: + - hasDocuments: + count: 1 + - documentIndex: 0 + equal: + path: name + value: test diff --git a/library/common/1.0.0/Chart.yaml b/library/common/1.0.0/Chart.yaml new file mode 100644 index 00000000..a094981b --- /dev/null +++ b/library/common/1.0.0/Chart.yaml @@ -0,0 +1,26 @@ +apiVersion: v2 +name: common +description: A library chart for iX Official Catalog + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. + +# Temporary set to application so I can render it locally +type: library +# type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 1.0.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +appVersion: v1 diff --git a/library/common/1.0.0/values.yaml b/library/common/1.0.0/values.yaml index 3802a9eb..bea581dd 100644 --- a/library/common/1.0.0/values.yaml +++ b/library/common/1.0.0/values.yaml @@ -3,6 +3,8 @@ global: nameOverride: "" # -- Sets additional global annotations. Helm templates can be used. annotations: {} + # -- Set additional global labels. Helm templates can be used. + labels: {} # -- Sets an override for the suffix of the full name (Applies to current chart only) nameOverride: ""