-
Notifications
You must be signed in to change notification settings - Fork 24
/
repos.robot
105 lines (88 loc) · 3.7 KB
/
repos.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#
# Copyright The Helm Authors.
#
# 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.
*** Settings ***
Documentation Verify helm repo commands work as expected.
...
Library OperatingSystem
Library ../lib/Sh.py
*** Test Cases ***
[HELM-002] No repos provisioned yet
Check helm version
Should fail helm repo list
Output contains Error: no repositories
[HELM-003] Add a first valid repo
Check helm version
Should pass helm repo add gitlab https://charts.gitlab.io
Output contains "gitlab" has been added to your repositories
[HELM-004] Add invalid repo without protocol
Check helm version
Should fail helm repo add invalid notAValidURL
Output contains Error: could not find protocol handler
[HELM-005] Add invalid repo with protocol
Check helm version
Should fail helm repo add invalid https://example.com
Output contains Error: looks like "https://example.com" is not a valid chart repository or cannot be reached
[HELM-006] Add a second valid repo
Check helm version
Should pass helm repo add jfrog https://charts.jfrog.io
Output contains "jfrog" has been added to your repositories
[HELM-007] Check output of repo list
Check helm version
Should pass helm repo list
Output contains gitlab
Output contains https://charts.gitlab.io
Output contains jfrog
Output contains https://charts.jfrog.io
Output does not contain invalid
[HELM-008] Make sure both repos get updated
Check helm version
Should pass helm repo update
Output contains Successfully got an update from the "gitlab" chart repository
Output contains Successfully got an update from the "jfrog" chart repository
Output contains Update Complete. ⎈Happy Helming!⎈
[HELM-009] Try to remove nonexistent repo
Check helm version
Should fail helm repo remove badname
Output contains Error: no repo named "badname" found
[HELM-010] Remove a repo
Check helm version
Should pass helm repo remove gitlab
Output contains "gitlab" has been removed from your repositories
[HELM-011] Make sure repo update will only update the remaining repo
Check helm version
Should pass helm repo update
Output contains Successfully got an update from the "jfrog" chart repository
Output contains Update Complete. ⎈Happy Helming!⎈
[HELM-012] Try removing an already removed repo
Check helm version
Should fail helm repo remove gitlab
Output contains Error: no repo named "gitlab" found
[HELM-013] Remove last repo
Check helm version
Should pass helm repo remove jfrog
Output contains "jfrog" has been removed from your repositories
[HELM-014] Check there are no more repos
Check helm version
Should fail helm repo list
Output contains Error: no repositories to show
[HELM-015] Make sure repo update now fails, with a proper message
Check helm version
Should fail helm repo update
Output contains Error: no repositories found. You must add one before updating
# "helm repo index" should also be tested
*** Keyword ***
Check helm version
${helm_version} = Get Environment Variable ROBOT_HELM_V3 "v2"
Pass Execution If ${helm_version} == 'v2' Helm v2 not supported. Skipping test.