Class: HelmStringBuilderTest
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- HelmStringBuilderTest
- Defined in:
- lib/kube/helm/instance.rb
Instance Method Summary collapse
- #assert_buffer(result, expected) ⇒ Object
- #assert_string(result, expected) ⇒ Object
- #sb(&block) ⇒ Object
-
#test_helm_completion_bash ⇒ Object
— helm completion bash —.
- #test_helm_completion_bash_no_descriptions ⇒ Object
-
#test_helm_completion_fish ⇒ Object
— helm completion fish —.
- #test_helm_completion_fish_no_descriptions ⇒ Object
-
#test_helm_completion_powershell ⇒ Object
— helm completion powershell —.
- #test_helm_completion_powershell_no_descriptions ⇒ Object
-
#test_helm_completion_zsh ⇒ Object
— helm completion zsh —.
- #test_helm_completion_zsh_no_descriptions ⇒ Object
-
#test_helm_create_mychart ⇒ Object
— helm create —.
- #test_helm_create_mychart_starter ⇒ Object
- #test_helm_create_mychart_starter_long ⇒ Object
-
#test_helm_dependency_build ⇒ Object
— helm dependency build —.
-
#test_helm_dependency_list ⇒ Object
— helm dependency list —.
-
#test_helm_dependency_update ⇒ Object
— helm dependency update —.
-
#test_helm_env ⇒ Object
— helm env —.
-
#test_helm_get_all ⇒ Object
— helm get all —.
-
#test_helm_get_hooks ⇒ Object
— helm get hooks —.
-
#test_helm_get_manifest ⇒ Object
— helm get manifest —.
-
#test_helm_get_metadata ⇒ Object
— helm get metadata —.
-
#test_helm_get_notes ⇒ Object
— helm get notes —.
-
#test_helm_get_values ⇒ Object
— helm get values —.
-
#test_helm_history ⇒ Object
— helm history —.
- #test_helm_history_angry_bird ⇒ Object
- #test_helm_install_f_myvalues_yaml_f_override_yaml_myredis_redis ⇒ Object
-
#test_helm_install_f_myvalues_yaml_myredis_redis ⇒ Object
— helm install —.
- #test_helm_install_mymaria_example_mariadb ⇒ Object
- #test_helm_install_mynginx_local_dir ⇒ Object
- #test_helm_install_mynginx_tgz ⇒ Object
- #test_helm_install_mynginx_url ⇒ Object
- #test_helm_install_mynginx_version_oci ⇒ Object
- #test_helm_install_repo_mynginx_nginx ⇒ Object
- #test_helm_install_set_file_my_script_myredis_redis ⇒ Object
- #test_helm_install_set_foo_bar_set_foo_newbar_myredis_redis ⇒ Object
- #test_helm_install_set_name_prod_myredis_redis ⇒ Object
- #test_helm_install_set_string_long_int_myredis_redis ⇒ Object
-
#test_helm_lint ⇒ Object
— helm lint —.
-
#test_helm_list ⇒ Object
— helm list —.
- #test_helm_list_filter ⇒ Object
-
#test_helm_package ⇒ Object
— helm package —.
- #test_helm_package_sign ⇒ Object
-
#test_helm_plugin_install ⇒ Object
— helm plugin install —.
-
#test_helm_plugin_list ⇒ Object
— helm plugin list —.
-
#test_helm_plugin_package ⇒ Object
— helm plugin package —.
-
#test_helm_plugin_uninstall ⇒ Object
— helm plugin uninstall —.
-
#test_helm_plugin_update ⇒ Object
— helm plugin update —.
-
#test_helm_plugin_verify ⇒ Object
— helm plugin verify —.
- #test_helm_plugin_verify_example ⇒ Object
-
#test_helm_pull ⇒ Object
— helm pull —.
-
#test_helm_push ⇒ Object
— helm push —.
-
#test_helm_registry_login ⇒ Object
— helm registry login —.
-
#test_helm_registry_logout ⇒ Object
— helm registry logout —.
-
#test_helm_repo_add ⇒ Object
— helm repo add —.
-
#test_helm_repo_index ⇒ Object
— helm repo index —.
-
#test_helm_repo_list ⇒ Object
— helm repo list —.
-
#test_helm_repo_remove ⇒ Object
— helm repo remove —.
-
#test_helm_repo_update ⇒ Object
— helm repo update —.
- #test_helm_repo_update_with_name ⇒ Object
-
#test_helm_rollback ⇒ Object
— helm rollback —.
-
#test_helm_search_hub ⇒ Object
— helm search hub —.
-
#test_helm_search_repo ⇒ Object
— helm search repo —.
- #test_helm_search_repo_devel ⇒ Object
- #test_helm_search_repo_version ⇒ Object
-
#test_helm_show_all ⇒ Object
— helm show all —.
-
#test_helm_show_chart ⇒ Object
— helm show chart —.
-
#test_helm_show_crds ⇒ Object
— helm show crds —.
-
#test_helm_show_readme ⇒ Object
— helm show readme —.
-
#test_helm_show_values ⇒ Object
— helm show values —.
-
#test_helm_status ⇒ Object
— helm status —.
-
#test_helm_template ⇒ Object
— helm template —.
- #test_helm_template_api_versions ⇒ Object
- #test_helm_template_api_versions_comma ⇒ Object
-
#test_helm_test ⇒ Object
— helm test —.
-
#test_helm_uninstall ⇒ Object
— helm uninstall —.
-
#test_helm_upgrade_f_myvalues_yaml_f_override_yaml_redis ⇒ Object
— helm upgrade —.
- #test_helm_upgrade_reuse_values_set_foo_bar_set_foo_newbar_redis ⇒ Object
- #test_helm_upgrade_set_foo_bar_set_foo_newbar_redis ⇒ Object
-
#test_helm_verify ⇒ Object
— helm verify —.
-
#test_helm_version ⇒ Object
— helm version —.
Instance Method Details
#assert_buffer(result, expected) ⇒ Object
59 60 61 |
# File 'lib/kube/helm/instance.rb', line 59 def assert_buffer(result, expected) assert_equal expected, result.to_a end |
#assert_string(result, expected) ⇒ Object
63 64 65 |
# File 'lib/kube/helm/instance.rb', line 63 def assert_string(result, expected) assert_equal expected, result.to_s end |
#sb(&block) ⇒ Object
55 56 57 |
# File 'lib/kube/helm/instance.rb', line 55 def sb(&block) Kube.helm(&block) end |
#test_helm_completion_bash ⇒ Object
— helm completion bash —
69 70 71 72 73 |
# File 'lib/kube/helm/instance.rb', line 69 def test_helm_completion_bash result = sb { completion.bash } assert_buffer(result, [["completion", []], ["bash", []]]) assert_string(result, "completion bash") end |
#test_helm_completion_bash_no_descriptions ⇒ Object
75 76 77 78 79 |
# File 'lib/kube/helm/instance.rb', line 75 def test_helm_completion_bash_no_descriptions result = sb { completion.bash.no_descriptions(true) } assert_buffer(result, [["completion", []], ["bash", []], ["no_descriptions", [true]]]) assert_string(result, "completion bash --no-descriptions") end |
#test_helm_completion_fish ⇒ Object
— helm completion fish —
97 98 99 100 101 |
# File 'lib/kube/helm/instance.rb', line 97 def test_helm_completion_fish result = sb { completion.fish } assert_buffer(result, [["completion", []], ["fish", []]]) assert_string(result, "completion fish") end |
#test_helm_completion_fish_no_descriptions ⇒ Object
103 104 105 106 107 |
# File 'lib/kube/helm/instance.rb', line 103 def test_helm_completion_fish_no_descriptions result = sb { completion.fish.no_descriptions(true) } assert_buffer(result, [["completion", []], ["fish", []], ["no_descriptions", [true]]]) assert_string(result, "completion fish --no-descriptions") end |
#test_helm_completion_powershell ⇒ Object
— helm completion powershell —
111 112 113 114 115 |
# File 'lib/kube/helm/instance.rb', line 111 def test_helm_completion_powershell result = sb { completion.powershell } assert_buffer(result, [["completion", []], ["powershell", []]]) assert_string(result, "completion powershell") end |
#test_helm_completion_powershell_no_descriptions ⇒ Object
117 118 119 120 121 |
# File 'lib/kube/helm/instance.rb', line 117 def test_helm_completion_powershell_no_descriptions result = sb { completion.powershell.no_descriptions(true) } assert_buffer(result, [["completion", []], ["powershell", []], ["no_descriptions", [true]]]) assert_string(result, "completion powershell --no-descriptions") end |
#test_helm_completion_zsh ⇒ Object
— helm completion zsh —
83 84 85 86 87 |
# File 'lib/kube/helm/instance.rb', line 83 def test_helm_completion_zsh result = sb { completion.zsh } assert_buffer(result, [["completion", []], ["zsh", []]]) assert_string(result, "completion zsh") end |
#test_helm_completion_zsh_no_descriptions ⇒ Object
89 90 91 92 93 |
# File 'lib/kube/helm/instance.rb', line 89 def test_helm_completion_zsh_no_descriptions result = sb { completion.zsh.no_descriptions(true) } assert_buffer(result, [["completion", []], ["zsh", []], ["no_descriptions", [true]]]) assert_string(result, "completion zsh --no-descriptions") end |
#test_helm_create_mychart ⇒ Object
— helm create —
125 126 127 128 129 |
# File 'lib/kube/helm/instance.rb', line 125 def test_helm_create_mychart result = sb { create.mychart } assert_buffer(result, [["create", []], ["mychart", []]]) assert_string(result, "create mychart") end |
#test_helm_create_mychart_starter ⇒ Object
131 132 133 134 135 |
# File 'lib/kube/helm/instance.rb', line 131 def test_helm_create_mychart_starter result = sb { create.mychart.p('my-starter') } assert_buffer(result, [["create", []], ["mychart", []], ["p", ["my-starter"]]]) assert_string(result, "create mychart -p my-starter") end |
#test_helm_create_mychart_starter_long ⇒ Object
137 138 139 140 141 |
# File 'lib/kube/helm/instance.rb', line 137 def test_helm_create_mychart_starter_long result = sb { create.mychart.starter('my-starter') } assert_buffer(result, [["create", []], ["mychart", []], ["starter", ["my-starter"]]]) assert_string(result, "create mychart --starter=my-starter") end |
#test_helm_dependency_build ⇒ Object
— helm dependency build —
145 146 147 148 149 |
# File 'lib/kube/helm/instance.rb', line 145 def test_helm_dependency_build result = sb { dependency.build.("CHART") } assert_buffer(result, [["dependency", []], ["build", []], ["CHART", []]]) assert_string(result, "dependency build CHART") end |
#test_helm_dependency_list ⇒ Object
— helm dependency list —
153 154 155 156 157 |
# File 'lib/kube/helm/instance.rb', line 153 def test_helm_dependency_list result = sb { dependency.list.("CHART") } assert_buffer(result, [["dependency", []], ["list", []], ["CHART", []]]) assert_string(result, "dependency list CHART") end |
#test_helm_dependency_update ⇒ Object
— helm dependency update —
161 162 163 164 165 |
# File 'lib/kube/helm/instance.rb', line 161 def test_helm_dependency_update result = sb { dependency.update.("CHART") } assert_buffer(result, [["dependency", []], ["update", []], ["CHART", []]]) assert_string(result, "dependency update CHART") end |
#test_helm_env ⇒ Object
— helm env —
169 170 171 172 173 |
# File 'lib/kube/helm/instance.rb', line 169 def test_helm_env result = sb { env } assert_buffer(result, [["env", []]]) assert_string(result, "env") end |
#test_helm_get_all ⇒ Object
— helm get all —
177 178 179 180 181 |
# File 'lib/kube/helm/instance.rb', line 177 def test_helm_get_all result = sb { get.all.("RELEASE_NAME") } assert_buffer(result, [["get", []], ["all", []], ["RELEASE_NAME", []]]) assert_string(result, "get all RELEASE_NAME") end |
#test_helm_get_hooks ⇒ Object
— helm get hooks —
185 186 187 188 189 |
# File 'lib/kube/helm/instance.rb', line 185 def test_helm_get_hooks result = sb { get.hooks.("RELEASE_NAME") } assert_buffer(result, [["get", []], ["hooks", []], ["RELEASE_NAME", []]]) assert_string(result, "get hooks RELEASE_NAME") end |
#test_helm_get_manifest ⇒ Object
— helm get manifest —
193 194 195 196 197 |
# File 'lib/kube/helm/instance.rb', line 193 def test_helm_get_manifest result = sb { get.manifest.("RELEASE_NAME") } assert_buffer(result, [["get", []], ["manifest", []], ["RELEASE_NAME", []]]) assert_string(result, "get manifest RELEASE_NAME") end |
#test_helm_get_metadata ⇒ Object
— helm get metadata —
201 202 203 204 205 |
# File 'lib/kube/helm/instance.rb', line 201 def result = sb { get..("RELEASE_NAME") } assert_buffer(result, [["get", []], ["metadata", []], ["RELEASE_NAME", []]]) assert_string(result, "get metadata RELEASE_NAME") end |
#test_helm_get_notes ⇒ Object
— helm get notes —
209 210 211 212 213 |
# File 'lib/kube/helm/instance.rb', line 209 def test_helm_get_notes result = sb { get.notes.("RELEASE_NAME") } assert_buffer(result, [["get", []], ["notes", []], ["RELEASE_NAME", []]]) assert_string(result, "get notes RELEASE_NAME") end |
#test_helm_get_values ⇒ Object
— helm get values —
217 218 219 220 221 |
# File 'lib/kube/helm/instance.rb', line 217 def test_helm_get_values result = sb { get.values.("RELEASE_NAME") } assert_buffer(result, [["get", []], ["values", []], ["RELEASE_NAME", []]]) assert_string(result, "get values RELEASE_NAME") end |
#test_helm_history ⇒ Object
— helm history —
225 226 227 228 229 |
# File 'lib/kube/helm/instance.rb', line 225 def test_helm_history result = sb { history.("RELEASE_NAME") } assert_buffer(result, [["history", []], ["RELEASE_NAME", []]]) assert_string(result, "history RELEASE_NAME") end |
#test_helm_history_angry_bird ⇒ Object
231 232 233 234 235 |
# File 'lib/kube/helm/instance.rb', line 231 def test_helm_history_angry_bird result = sb { history.angry-bird } assert_buffer(result, [["history", []], ["angry", []], :dash, ["bird", []]]) assert_string(result, "history angry-bird") end |
#test_helm_install_f_myvalues_yaml_f_override_yaml_myredis_redis ⇒ Object
263 264 265 266 267 |
# File 'lib/kube/helm/instance.rb', line 263 def test_helm_install_f_myvalues_yaml_f_override_yaml_myredis_redis result = sb { install.f('myvalues.yaml').f('override.yaml').myredis.("./redis") } assert_buffer(result, [["install", []], ["f", ["myvalues.yaml"]], ["f", ["override.yaml"]], ["myredis", []], ["./redis", []]]) assert_string(result, "install -f myvalues.yaml -f override.yaml myredis ./redis") end |
#test_helm_install_f_myvalues_yaml_myredis_redis ⇒ Object
— helm install —
239 240 241 242 243 |
# File 'lib/kube/helm/instance.rb', line 239 def test_helm_install_f_myvalues_yaml_myredis_redis result = sb { install.f('myvalues.yaml').myredis.("./redis") } assert_buffer(result, [["install", []], ["f", ["myvalues.yaml"]], ["myredis", []], ["./redis", []]]) assert_string(result, "install -f myvalues.yaml myredis ./redis") end |
#test_helm_install_mymaria_example_mariadb ⇒ Object
275 276 277 278 279 |
# File 'lib/kube/helm/instance.rb', line 275 def test_helm_install_mymaria_example_mariadb result = sb { install.mymaria.("example/mariadb") } assert_buffer(result, [["install", []], ["mymaria", []], ["example/mariadb", []]]) assert_string(result, "install mymaria example/mariadb") end |
#test_helm_install_mynginx_local_dir ⇒ Object
287 288 289 290 291 |
# File 'lib/kube/helm/instance.rb', line 287 def test_helm_install_mynginx_local_dir result = sb { install.mynginx.("./nginx") } assert_buffer(result, [["install", []], ["mynginx", []], ["./nginx", []]]) assert_string(result, "install mynginx ./nginx") end |
#test_helm_install_mynginx_tgz ⇒ Object
281 282 283 284 285 |
# File 'lib/kube/helm/instance.rb', line 281 def test_helm_install_mynginx_tgz result = sb { install.mynginx.("./nginx-1.2.3.tgz") } assert_buffer(result, [["install", []], ["mynginx", []], ["./nginx-1.2.3.tgz", []]]) assert_string(result, "install mynginx ./nginx-1.2.3.tgz") end |
#test_helm_install_mynginx_url ⇒ Object
293 294 295 296 297 |
# File 'lib/kube/helm/instance.rb', line 293 def test_helm_install_mynginx_url result = sb { install.mynginx.("https://example.com/charts/nginx-1.2.3.tgz") } assert_buffer(result, [["install", []], ["mynginx", []], ["https://example.com/charts/nginx-1.2.3.tgz", []]]) assert_string(result, "install mynginx https://example.com/charts/nginx-1.2.3.tgz") end |
#test_helm_install_mynginx_version_oci ⇒ Object
305 306 307 308 309 |
# File 'lib/kube/helm/instance.rb', line 305 def test_helm_install_mynginx_version_oci result = sb { install.mynginx.version('1.2.3').("oci://example.com/charts/nginx") } assert_buffer(result, [["install", []], ["mynginx", []], ["version", ["1.2.3"]], ["oci://example.com/charts/nginx", []]]) assert_string(result, "install mynginx --version=1.2.3 oci://example.com/charts/nginx") end |
#test_helm_install_repo_mynginx_nginx ⇒ Object
299 300 301 302 303 |
# File 'lib/kube/helm/instance.rb', line 299 def test_helm_install_repo_mynginx_nginx result = sb { install.repo('https://example.com/charts/').mynginx.nginx } assert_buffer(result, [["install", []], ["repo", ["https://example.com/charts/"]], ["mynginx", []], ["nginx", []]]) assert_string(result, "install --repo=https://example.com/charts/ mynginx nginx") end |
#test_helm_install_set_file_my_script_myredis_redis ⇒ Object
257 258 259 260 261 |
# File 'lib/kube/helm/instance.rb', line 257 def test_helm_install_set_file_my_script_myredis_redis result = sb { install.set_file('my_script=dothings.sh').myredis.("./redis") } assert_buffer(result, [["install", []], ["set_file", ["my_script=dothings.sh"]], ["myredis", []], ["./redis", []]]) assert_string(result, "install --set-file=my_script=dothings.sh myredis ./redis") end |
#test_helm_install_set_foo_bar_set_foo_newbar_myredis_redis ⇒ Object
269 270 271 272 273 |
# File 'lib/kube/helm/instance.rb', line 269 def result = sb { install.set('foo=bar').set('foo=newbar').myredis.("./redis") } assert_buffer(result, [["install", []], ["set", ["foo=bar"]], ["set", ["foo=newbar"]], ["myredis", []], ["./redis", []]]) assert_string(result, "install --set=foo=bar --set=foo=newbar myredis ./redis") end |
#test_helm_install_set_name_prod_myredis_redis ⇒ Object
245 246 247 248 249 |
# File 'lib/kube/helm/instance.rb', line 245 def test_helm_install_set_name_prod_myredis_redis result = sb { install.set('name=prod').myredis.("./redis") } assert_buffer(result, [["install", []], ["set", ["name=prod"]], ["myredis", []], ["./redis", []]]) assert_string(result, "install --set=name=prod myredis ./redis") end |
#test_helm_install_set_string_long_int_myredis_redis ⇒ Object
251 252 253 254 255 |
# File 'lib/kube/helm/instance.rb', line 251 def test_helm_install_set_string_long_int_myredis_redis result = sb { install.set_string('long_int=1234567890').myredis.("./redis") } assert_buffer(result, [["install", []], ["set_string", ["long_int=1234567890"]], ["myredis", []], ["./redis", []]]) assert_string(result, "install --set-string=long_int=1234567890 myredis ./redis") end |
#test_helm_lint ⇒ Object
— helm lint —
313 314 315 316 317 |
# File 'lib/kube/helm/instance.rb', line 313 def test_helm_lint result = sb { lint.("PATH") } assert_buffer(result, [["lint", []], ["PATH", []]]) assert_string(result, "lint PATH") end |
#test_helm_list ⇒ Object
— helm list —
321 322 323 324 325 |
# File 'lib/kube/helm/instance.rb', line 321 def test_helm_list result = sb { list } assert_buffer(result, [["list", []]]) assert_string(result, "list") end |
#test_helm_list_filter ⇒ Object
327 328 329 330 331 |
# File 'lib/kube/helm/instance.rb', line 327 def test_helm_list_filter result = sb { list.filter('ara[a-z]+') } assert_buffer(result, [["list", []], ["filter", ["ara[a-z]+"]]]) assert_string(result, "list --filter=ara[a-z]+") end |
#test_helm_package ⇒ Object
— helm package —
335 336 337 338 339 |
# File 'lib/kube/helm/instance.rb', line 335 def test_helm_package result = sb { package.("./mychart") } assert_buffer(result, [["package", []], ["./mychart", []]]) assert_string(result, "package ./mychart") end |
#test_helm_package_sign ⇒ Object
341 342 343 344 345 |
# File 'lib/kube/helm/instance.rb', line 341 def test_helm_package_sign result = sb { package.sign(true).("./mychart").key('mykey').keyring('~/.gnupg/secring.gpg') } assert_buffer(result, [["package", []], ["sign", [true]], ["./mychart", []], ["key", ["mykey"]], ["keyring", ["~/.gnupg/secring.gpg"]]]) assert_string(result, "package --sign ./mychart --key=mykey --keyring=~/.gnupg/secring.gpg") end |
#test_helm_plugin_install ⇒ Object
— helm plugin install —
349 350 351 352 353 |
# File 'lib/kube/helm/instance.rb', line 349 def test_helm_plugin_install result = sb { plugin.install.("https://example.com/plugin") } assert_buffer(result, [["plugin", []], ["install", []], ["https://example.com/plugin", []]]) assert_string(result, "plugin install https://example.com/plugin") end |
#test_helm_plugin_list ⇒ Object
— helm plugin list —
357 358 359 360 361 |
# File 'lib/kube/helm/instance.rb', line 357 def test_helm_plugin_list result = sb { plugin.list } assert_buffer(result, [["plugin", []], ["list", []]]) assert_string(result, "plugin list") end |
#test_helm_plugin_package ⇒ Object
— helm plugin package —
365 366 367 368 369 |
# File 'lib/kube/helm/instance.rb', line 365 def test_helm_plugin_package result = sb { plugin.package.("PATH") } assert_buffer(result, [["plugin", []], ["package", []], ["PATH", []]]) assert_string(result, "plugin package PATH") end |
#test_helm_plugin_uninstall ⇒ Object
— helm plugin uninstall —
373 374 375 376 377 |
# File 'lib/kube/helm/instance.rb', line 373 def test_helm_plugin_uninstall result = sb { plugin.uninstall.("my-plugin") } assert_buffer(result, [["plugin", []], ["uninstall", []], ["my-plugin", []]]) assert_string(result, "plugin uninstall my-plugin") end |
#test_helm_plugin_update ⇒ Object
— helm plugin update —
381 382 383 384 385 |
# File 'lib/kube/helm/instance.rb', line 381 def test_helm_plugin_update result = sb { plugin.update.("my-plugin") } assert_buffer(result, [["plugin", []], ["update", []], ["my-plugin", []]]) assert_string(result, "plugin update my-plugin") end |
#test_helm_plugin_verify ⇒ Object
— helm plugin verify —
389 390 391 392 393 |
# File 'lib/kube/helm/instance.rb', line 389 def test_helm_plugin_verify result = sb { plugin.verify.("PATH") } assert_buffer(result, [["plugin", []], ["verify", []], ["PATH", []]]) assert_string(result, "plugin verify PATH") end |
#test_helm_plugin_verify_example ⇒ Object
395 396 397 398 399 |
# File 'lib/kube/helm/instance.rb', line 395 def test_helm_plugin_verify_example result = sb { plugin.verify.("~/.local/share/helm/plugins/example-cli") } assert_buffer(result, [["plugin", []], ["verify", []], ["~/.local/share/helm/plugins/example-cli", []]]) assert_string(result, "plugin verify ~/.local/share/helm/plugins/example-cli") end |
#test_helm_pull ⇒ Object
— helm pull —
403 404 405 406 407 |
# File 'lib/kube/helm/instance.rb', line 403 def test_helm_pull result = sb { pull.("repo/chartname") } assert_buffer(result, [["pull", []], ["repo/chartname", []]]) assert_string(result, "pull repo/chartname") end |
#test_helm_push ⇒ Object
— helm push —
411 412 413 414 415 |
# File 'lib/kube/helm/instance.rb', line 411 def test_helm_push result = sb { push.("mychart-0.1.0.tgz").("oci://localhost:5000/helm-charts") } assert_buffer(result, [["push", []], ["mychart-0.1.0.tgz", []], ["oci://localhost:5000/helm-charts", []]]) assert_string(result, "push mychart-0.1.0.tgz oci://localhost:5000/helm-charts") end |
#test_helm_registry_login ⇒ Object
— helm registry login —
419 420 421 422 423 |
# File 'lib/kube/helm/instance.rb', line 419 def test_helm_registry_login result = sb { registry.login.("localhost:5000") } assert_buffer(result, [["registry", []], ["login", []], ["localhost:5000", []]]) assert_string(result, "registry login localhost:5000") end |
#test_helm_registry_logout ⇒ Object
— helm registry logout —
427 428 429 430 431 |
# File 'lib/kube/helm/instance.rb', line 427 def test_helm_registry_logout result = sb { registry.logout.("localhost:5000") } assert_buffer(result, [["registry", []], ["logout", []], ["localhost:5000", []]]) assert_string(result, "registry logout localhost:5000") end |
#test_helm_repo_add ⇒ Object
— helm repo add —
435 436 437 438 439 |
# File 'lib/kube/helm/instance.rb', line 435 def test_helm_repo_add result = sb { repo.add.("bitnami").("https://charts.bitnami.com/bitnami") } assert_buffer(result, [["repo", []], ["add", []], ["bitnami", []], ["https://charts.bitnami.com/bitnami", []]]) assert_string(result, "repo add bitnami https://charts.bitnami.com/bitnami") end |
#test_helm_repo_index ⇒ Object
— helm repo index —
443 444 445 446 447 |
# File 'lib/kube/helm/instance.rb', line 443 def test_helm_repo_index result = sb { repo.index.("DIR") } assert_buffer(result, [["repo", []], ["index", []], ["DIR", []]]) assert_string(result, "repo index DIR") end |
#test_helm_repo_list ⇒ Object
— helm repo list —
451 452 453 454 455 |
# File 'lib/kube/helm/instance.rb', line 451 def test_helm_repo_list result = sb { repo.list } assert_buffer(result, [["repo", []], ["list", []]]) assert_string(result, "repo list") end |
#test_helm_repo_remove ⇒ Object
— helm repo remove —
459 460 461 462 463 |
# File 'lib/kube/helm/instance.rb', line 459 def test_helm_repo_remove result = sb { repo.remove.("bitnami") } assert_buffer(result, [["repo", []], ["remove", []], ["bitnami", []]]) assert_string(result, "repo remove bitnami") end |
#test_helm_repo_update ⇒ Object
— helm repo update —
467 468 469 470 471 |
# File 'lib/kube/helm/instance.rb', line 467 def test_helm_repo_update result = sb { repo.update } assert_buffer(result, [["repo", []], ["update", []]]) assert_string(result, "repo update") end |
#test_helm_repo_update_with_name ⇒ Object
473 474 475 476 477 |
# File 'lib/kube/helm/instance.rb', line 473 def test_helm_repo_update_with_name result = sb { repo.update.("my-repo") } assert_buffer(result, [["repo", []], ["update", []], ["my-repo", []]]) assert_string(result, "repo update my-repo") end |
#test_helm_rollback ⇒ Object
— helm rollback —
481 482 483 484 485 |
# File 'lib/kube/helm/instance.rb', line 481 def test_helm_rollback result = sb { rollback.("my-release").("2") } assert_buffer(result, [["rollback", []], ["my-release", []], ["2", []]]) assert_string(result, "rollback my-release 2") end |
#test_helm_search_hub ⇒ Object
— helm search hub —
489 490 491 492 493 |
# File 'lib/kube/helm/instance.rb', line 489 def test_helm_search_hub result = sb { search.hub.("nginx") } assert_buffer(result, [["search", []], ["hub", []], ["nginx", []]]) assert_string(result, "search hub nginx") end |
#test_helm_search_repo ⇒ Object
— helm search repo —
497 498 499 500 501 |
# File 'lib/kube/helm/instance.rb', line 497 def test_helm_search_repo result = sb { search.repo.("nginx") } assert_buffer(result, [["search", []], ["repo", []], ["nginx", []]]) assert_string(result, "search repo nginx") end |
#test_helm_search_repo_devel ⇒ Object
503 504 505 506 507 |
# File 'lib/kube/helm/instance.rb', line 503 def test_helm_search_repo_devel result = sb { search.repo.("nginx").devel(true) } assert_buffer(result, [["search", []], ["repo", []], ["nginx", []], ["devel", [true]]]) assert_string(result, "search repo nginx --devel") end |
#test_helm_search_repo_version ⇒ Object
509 510 511 512 513 |
# File 'lib/kube/helm/instance.rb', line 509 def test_helm_search_repo_version result = sb { search.repo.("nginx-ingress").version('^1.0.0') } assert_buffer(result, [["search", []], ["repo", []], ["nginx-ingress", []], ["version", ["^1.0.0"]]]) assert_string(result, "search repo nginx-ingress --version=^1.0.0") end |
#test_helm_show_all ⇒ Object
— helm show all —
517 518 519 520 521 |
# File 'lib/kube/helm/instance.rb', line 517 def test_helm_show_all result = sb { show.all.("bitnami/nginx") } assert_buffer(result, [["show", []], ["all", []], ["bitnami/nginx", []]]) assert_string(result, "show all bitnami/nginx") end |
#test_helm_show_chart ⇒ Object
— helm show chart —
525 526 527 528 529 |
# File 'lib/kube/helm/instance.rb', line 525 def test_helm_show_chart result = sb { show.chart.("bitnami/nginx") } assert_buffer(result, [["show", []], ["chart", []], ["bitnami/nginx", []]]) assert_string(result, "show chart bitnami/nginx") end |
#test_helm_show_crds ⇒ Object
— helm show crds —
533 534 535 536 537 |
# File 'lib/kube/helm/instance.rb', line 533 def test_helm_show_crds result = sb { show.crds.("bitnami/nginx") } assert_buffer(result, [["show", []], ["crds", []], ["bitnami/nginx", []]]) assert_string(result, "show crds bitnami/nginx") end |
#test_helm_show_readme ⇒ Object
— helm show readme —
541 542 543 544 545 |
# File 'lib/kube/helm/instance.rb', line 541 def test_helm_show_readme result = sb { show.readme.("bitnami/nginx") } assert_buffer(result, [["show", []], ["readme", []], ["bitnami/nginx", []]]) assert_string(result, "show readme bitnami/nginx") end |
#test_helm_show_values ⇒ Object
— helm show values —
549 550 551 552 553 |
# File 'lib/kube/helm/instance.rb', line 549 def test_helm_show_values result = sb { show.values.("bitnami/nginx") } assert_buffer(result, [["show", []], ["values", []], ["bitnami/nginx", []]]) assert_string(result, "show values bitnami/nginx") end |
#test_helm_status ⇒ Object
— helm status —
557 558 559 560 561 |
# File 'lib/kube/helm/instance.rb', line 557 def test_helm_status result = sb { status.("RELEASE_NAME") } assert_buffer(result, [["status", []], ["RELEASE_NAME", []]]) assert_string(result, "status RELEASE_NAME") end |
#test_helm_template ⇒ Object
— helm template —
565 566 567 568 569 |
# File 'lib/kube/helm/instance.rb', line 565 def test_helm_template result = sb { template.my_release.("bitnami/nginx") } assert_buffer(result, [["template", []], ["my_release", []], ["bitnami/nginx", []]]) assert_string(result, "template my_release bitnami/nginx") end |
#test_helm_template_api_versions ⇒ Object
571 572 573 574 575 |
# File 'lib/kube/helm/instance.rb', line 571 def test_helm_template_api_versions result = sb { template.api_versions('networking.k8s.io/v1').api_versions('cert-manager.io/v1').mychart.("./mychart") } assert_buffer(result, [["template", []], ["api_versions", ["networking.k8s.io/v1"]], ["api_versions", ["cert-manager.io/v1"]], ["mychart", []], ["./mychart", []]]) assert_string(result, "template --api-versions=networking.k8s.io/v1 --api-versions=cert-manager.io/v1 mychart ./mychart") end |
#test_helm_template_api_versions_comma ⇒ Object
577 578 579 580 581 |
# File 'lib/kube/helm/instance.rb', line 577 def test_helm_template_api_versions_comma result = sb { template.api_versions('networking.k8s.io/v1', 'cert-manager.io/v1').mychart.("./mychart") } assert_buffer(result, [["template", []], ["api_versions", ["networking.k8s.io/v1", "cert-manager.io/v1"]], ["mychart", []], ["./mychart", []]]) assert_string(result, "template --api-versions=networking.k8s.io/v1,cert-manager.io/v1 mychart ./mychart") end |
#test_helm_test ⇒ Object
— helm test —
585 586 587 588 589 |
# File 'lib/kube/helm/instance.rb', line 585 def test_helm_test result = sb { test.("RELEASE") } assert_buffer(result, [["test", []], ["RELEASE", []]]) assert_string(result, "test RELEASE") end |
#test_helm_uninstall ⇒ Object
— helm uninstall —
593 594 595 596 597 |
# File 'lib/kube/helm/instance.rb', line 593 def test_helm_uninstall result = sb { uninstall.("RELEASE_NAME") } assert_buffer(result, [["uninstall", []], ["RELEASE_NAME", []]]) assert_string(result, "uninstall RELEASE_NAME") end |
#test_helm_upgrade_f_myvalues_yaml_f_override_yaml_redis ⇒ Object
— helm upgrade —
601 602 603 604 605 |
# File 'lib/kube/helm/instance.rb', line 601 def test_helm_upgrade_f_myvalues_yaml_f_override_yaml_redis result = sb { upgrade.f('myvalues.yaml').f('override.yaml').redis.("./redis") } assert_buffer(result, [["upgrade", []], ["f", ["myvalues.yaml"]], ["f", ["override.yaml"]], ["redis", []], ["./redis", []]]) assert_string(result, "upgrade -f myvalues.yaml -f override.yaml redis ./redis") end |
#test_helm_upgrade_reuse_values_set_foo_bar_set_foo_newbar_redis ⇒ Object
613 614 615 616 617 |
# File 'lib/kube/helm/instance.rb', line 613 def result = sb { upgrade.reuse_values(true).set('foo=bar').set('foo=newbar').redis.("./redis") } assert_buffer(result, [["upgrade", []], ["reuse_values", [true]], ["set", ["foo=bar"]], ["set", ["foo=newbar"]], ["redis", []], ["./redis", []]]) assert_string(result, "upgrade --reuse-values --set=foo=bar --set=foo=newbar redis ./redis") end |
#test_helm_upgrade_set_foo_bar_set_foo_newbar_redis ⇒ Object
607 608 609 610 611 |
# File 'lib/kube/helm/instance.rb', line 607 def result = sb { upgrade.set('foo=bar').set('foo=newbar').redis.("./redis") } assert_buffer(result, [["upgrade", []], ["set", ["foo=bar"]], ["set", ["foo=newbar"]], ["redis", []], ["./redis", []]]) assert_string(result, "upgrade --set=foo=bar --set=foo=newbar redis ./redis") end |
#test_helm_verify ⇒ Object
— helm verify —
621 622 623 624 625 |
# File 'lib/kube/helm/instance.rb', line 621 def test_helm_verify result = sb { verify.("PATH") } assert_buffer(result, [["verify", []], ["PATH", []]]) assert_string(result, "verify PATH") end |
#test_helm_version ⇒ Object
— helm version —
629 630 631 632 633 |
# File 'lib/kube/helm/instance.rb', line 629 def test_helm_version result = sb { version } assert_buffer(result, [["version", []]]) assert_string(result, "version") end |