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