blob: d52a12c405c04a57ae7b26be685e3697c733e27e [file] [log] [blame]
BjornMagnussonXAe60d04e2021-12-27 13:38:01 +01001#!/bin/bash
2
3# ============LICENSE_START===============================================
rohithrajneesh927c17e2023-12-01 14:26:03 +00004# Copyright (C) 2021-2023 Nordix Foundation. All rights reserved.
5# Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
BjornMagnussonXAe60d04e2021-12-27 13:38:01 +01006# ========================================================================
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18# ============LICENSE_END=================================================
19#
20
21TC_ONELINE_DESCR="Test of Helm Manager"
22
23#App names to include in the test when running docker, space separated list
24DOCKER_INCLUDED_IMAGES="KUBEPROXY CHARTMUS LOCALHELM HELMMANAGER"
25
26#App names to include in the test when running kubernetes, space separated list
27KUBE_INCLUDED_IMAGES="KUBEPROXY CHARTMUS LOCALHELM HELMMANAGER"
BjornMagnussonXAd54225b2023-04-19 14:03:49 +020028#Pre-started app (not started by script) to include in the test when running kubernetes, space separated list
BjornMagnussonXAe60d04e2021-12-27 13:38:01 +010029KUBE_PRESTARTED_IMAGES=""
30
31#Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if
32#the image is not configured in the supplied env_file
33#Used for images not applicable to all supported profile
34CONDITIONALLY_IGNORED_IMAGES=""
35
36#Supported test environment profiles
rohithrajneesh927c17e2023-12-01 14:26:03 +000037SUPPORTED_PROFILES="ORAN-G-RELEASE ORAN-H-RELEASE ORAN-I-RELEASE"
BjornMagnussonXAe60d04e2021-12-27 13:38:01 +010038#Supported run modes
39SUPPORTED_RUNMODES="DOCKER KUBE"
40
41. ../common/testcase_common.sh $@
42
43setup_testenvironment
44
45#### TEST BEGIN ####
46
47clean_environment
48
49start_kube_proxy
50
51start_chart_museum
52
53localhelm_create_test_chart dummy
54
55localhelm_package_test_chart dummy
56
57chartmus_upload_test_chart dummy
58
59clean_and_create_namespace test-ns
60
61localhelm_installed_chart_release NOTINSTALLED test-release test-ns
62
63start_helm_manager
64
65helm_manager_api_get_charts 200 EMPTY
66
67helm_manager_api_exec_add_repo cm $CHART_MUS_SERVICE_PATH
68
69helm_manager_api_post_repo 201 cm $CHART_MUS_SERVICE_HTTPX $CHART_MUS_SERVICE_HOST $CHART_MUS_SERVICE_PORT
70
71helm_manager_api_post_onboard_chart 200 cm dummy DEFAULT-VERSION test-release test-ns
72
73helm_manager_api_get_charts 200 cm dummy DEFAULT-VERSION test-release test-ns
74
75helm_manager_api_post_install_chart 201 dummy DEFAULT-VERSION
76
77localhelm_installed_chart_release INSTALLED test-release test-ns
78
79helm_manager_api_get_charts 200 cm dummy DEFAULT-VERSION test-release test-ns
80
81helm_manager_api_uninstall_chart 204 dummy DEFAULT-VERSION
82
83helm_manager_api_get_charts 200 cm dummy DEFAULT-VERSION test-release test-ns
84
85helm_manager_api_delete_chart 204 dummy DEFAULT-VERSION
86
87helm_manager_api_get_charts 200 EMPTY
88
89localhelm_installed_chart_release NOTINSTALLED test-release test-ns
90
91#### TEST COMPLETE ####
92
93store_logs END
94
95print_result
96
97auto_clean_environment
98
99
100