Class: VClusterStringBuilderTest
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- VClusterStringBuilderTest
- Defined in:
- lib/kube/vcluster/instance.rb
Instance Method Summary collapse
- #assert_buffer(result, expected) ⇒ Object
- #assert_string(result, expected) ⇒ Object
- #sb(&block) ⇒ Object
-
#test_connect_with_exec_bash ⇒ Object
vcluster connect test -n test – bash.
-
#test_connect_with_exec_kubectl ⇒ Object
vcluster connect test -n test – kubectl get ns.
-
#test_connect_with_namespace ⇒ Object
vcluster connect test –namespace test.
-
#test_create_with_namespace ⇒ Object
vcluster create test –namespace test.
-
#test_debug_shell_with_pod_and_target ⇒ Object
vcluster debug shell my-vcluster –pod=my-vcluster-pod-0 –target=syncer.
-
#test_debug_shell_with_target ⇒ Object
vcluster debug shell my-vcluster –target=syncer.
-
#test_delete_with_namespace ⇒ Object
vcluster delete test –namespace test.
-
#test_describe ⇒ Object
vcluster describe test.
-
#test_describe_output_json ⇒ Object
vcluster describe -o json test.
-
#test_disconnect ⇒ Object
vcluster disconnect.
-
#test_list ⇒ Object
vcluster list.
-
#test_list_namespace ⇒ Object
vcluster list –namespace test.
-
#test_list_output_json ⇒ Object
vcluster list –output json.
-
#test_logout ⇒ Object
vcluster logout.
-
#test_pause_with_namespace ⇒ Object
vcluster pause test –namespace test.
- #test_platform_add_cluster ⇒ Object
- #test_platform_add_standalone ⇒ Object
- #test_platform_add_vcluster_all ⇒ Object
- #test_platform_add_vcluster_full ⇒ Object
-
#test_platform_backup_management ⇒ Object
Platform — backup/reset/set/add ===================================================================.
-
#test_platform_connect_cluster ⇒ Object
Platform — connect ===================================================================.
- #test_platform_connect_management ⇒ Object
- #test_platform_connect_namespace ⇒ Object
- #test_platform_connect_namespace_with_project ⇒ Object
- #test_platform_connect_vcluster ⇒ Object
- #test_platform_connect_vcluster_exec_bash ⇒ Object
- #test_platform_connect_vcluster_exec_kubectl ⇒ Object
- #test_platform_create_accesskey ⇒ Object
- #test_platform_create_accesskey_in_cluster ⇒ Object
- #test_platform_create_accesskey_vcluster_role ⇒ Object
- #test_platform_create_namespace ⇒ Object
- #test_platform_create_namespace_with_project ⇒ Object
- #test_platform_create_namespace_with_project_and_team ⇒ Object
-
#test_platform_create_vcluster ⇒ Object
Platform — create ===================================================================.
- #test_platform_delete_namespace ⇒ Object
- #test_platform_delete_namespace_with_project ⇒ Object
-
#test_platform_delete_vcluster ⇒ Object
Platform — delete ===================================================================.
-
#test_platform_get_current_user ⇒ Object
Platform — get ===================================================================.
- #test_platform_get_secret ⇒ Object
- #test_platform_get_secret_with_project ⇒ Object
-
#test_platform_list_clusters ⇒ Object
Platform — list ===================================================================.
- #test_platform_list_namespaces ⇒ Object
- #test_platform_list_projects ⇒ Object
- #test_platform_list_secrets ⇒ Object
- #test_platform_list_teams ⇒ Object
- #test_platform_list_vclusters ⇒ Object
-
#test_platform_login ⇒ Object
vcluster platform login my-vcluster-platform.com.
-
#test_platform_login_with_access_key ⇒ Object
vcluster platform login my-vcluster-platform.com –access-key myaccesskey.
-
#test_platform_logout ⇒ Object
vcluster platform logout.
- #test_platform_reset_password ⇒ Object
- #test_platform_reset_password_with_user ⇒ Object
- #test_platform_set_secret ⇒ Object
- #test_platform_set_secret_with_project ⇒ Object
-
#test_platform_share_namespace ⇒ Object
Platform — share ===================================================================.
- #test_platform_share_namespace_with_project ⇒ Object
- #test_platform_share_namespace_with_project_and_user ⇒ Object
- #test_platform_share_vcluster ⇒ Object
- #test_platform_share_vcluster_with_project ⇒ Object
- #test_platform_share_vcluster_with_project_and_user ⇒ Object
-
#test_platform_sleep_namespace ⇒ Object
Platform — sleep/wakeup ===================================================================.
- #test_platform_sleep_namespace_with_project ⇒ Object
- #test_platform_sleep_vcluster ⇒ Object
-
#test_platform_token ⇒ Object
vcluster platform token.
- #test_platform_wakeup_namespace ⇒ Object
- #test_platform_wakeup_namespace_with_project ⇒ Object
- #test_platform_wakeup_vcluster ⇒ Object
-
#test_restore_container ⇒ Object
vcluster restore my-vcluster container:///data/my-local-snapshot.tar.gz.
-
#test_restore_oci ⇒ Object
vcluster restore my-vcluster oci://ghcr.io/my-user/my-repo:my-tag.
-
#test_restore_s3 ⇒ Object
vcluster restore my-vcluster s3://my-bucket/my-bucket-key.
-
#test_resume_with_namespace ⇒ Object
vcluster resume test –namespace test.
-
#test_snapshot_container ⇒ Object
vcluster snapshot my-vcluster container:///data/my-local-snapshot.tar.gz.
-
#test_snapshot_create_container ⇒ Object
vcluster snapshot create my-vcluster container:///data/my-local-snapshot.tar.gz.
-
#test_snapshot_create_oci ⇒ Object
vcluster snapshot create my-vcluster oci://ghcr.io/my-user/my-repo:my-tag.
-
#test_snapshot_create_s3 ⇒ Object
vcluster snapshot create my-vcluster s3://my-bucket/my-bucket-key.
-
#test_snapshot_get_container ⇒ Object
vcluster snapshot get my-vcluster container:///data/my-local-snapshot.tar.gz.
-
#test_snapshot_get_oci ⇒ Object
vcluster snapshot get my-vcluster oci://ghcr.io/my-user/my-repo:my-tag.
-
#test_snapshot_get_s3 ⇒ Object
vcluster snapshot get my-vcluster s3://my-bucket/my-bucket-key.
-
#test_snapshot_oci ⇒ Object
vcluster snapshot my-vcluster oci://ghcr.io/my-user/my-repo:my-tag.
-
#test_snapshot_s3 ⇒ Object
vcluster snapshot my-vcluster s3://my-bucket/my-bucket-key.
-
#test_ui ⇒ Object
vcluster ui.
Instance Method Details
#assert_buffer(result, expected) ⇒ Object
45 46 47 |
# File 'lib/kube/vcluster/instance.rb', line 45 def assert_buffer(result, expected) assert_equal expected, result.to_a end |
#assert_string(result, expected) ⇒ Object
49 50 51 |
# File 'lib/kube/vcluster/instance.rb', line 49 def assert_string(result, expected) assert_equal expected, result.to_s end |
#sb(&block) ⇒ Object
41 42 43 |
# File 'lib/kube/vcluster/instance.rb', line 41 def sb(&block) Kube.vcluster(&block) end |
#test_connect_with_exec_bash ⇒ Object
vcluster connect test -n test – bash
70 71 72 73 |
# File 'lib/kube/vcluster/instance.rb', line 70 def test_connect_with_exec_bash result = sb { connect.test.n("test").("-- bash") } assert_string(result, "connect test -n test -- bash") end |
#test_connect_with_exec_kubectl ⇒ Object
vcluster connect test -n test – kubectl get ns
76 77 78 79 |
# File 'lib/kube/vcluster/instance.rb', line 76 def test_connect_with_exec_kubectl result = sb { connect.test.n("test").("-- kubectl get ns") } assert_string(result, "connect test -n test -- kubectl get ns") end |
#test_connect_with_namespace ⇒ Object
vcluster connect test –namespace test
64 65 66 67 |
# File 'lib/kube/vcluster/instance.rb', line 64 def test_connect_with_namespace result = sb { connect.test.namespace("test") } assert_string(result, "connect test --namespace=test") end |
#test_create_with_namespace ⇒ Object
vcluster create test –namespace test
58 59 60 61 |
# File 'lib/kube/vcluster/instance.rb', line 58 def test_create_with_namespace result = sb { create.test.namespace("test") } assert_string(result, "create test --namespace=test") end |
#test_debug_shell_with_pod_and_target ⇒ Object
vcluster debug shell my-vcluster –pod=my-vcluster-pod-0 –target=syncer
162 163 164 165 |
# File 'lib/kube/vcluster/instance.rb', line 162 def test_debug_shell_with_pod_and_target result = sb { debug.shell.my-vcluster.pod("my-vcluster-pod-0").target("syncer") } assert_string(result, "debug shell my-vcluster --pod=my-vcluster-pod-0 --target=syncer") end |
#test_debug_shell_with_target ⇒ Object
vcluster debug shell my-vcluster –target=syncer
156 157 158 159 |
# File 'lib/kube/vcluster/instance.rb', line 156 def test_debug_shell_with_target result = sb { debug.shell.my-vcluster.target("syncer") } assert_string(result, "debug shell my-vcluster --target=syncer") end |
#test_delete_with_namespace ⇒ Object
vcluster delete test –namespace test
82 83 84 85 |
# File 'lib/kube/vcluster/instance.rb', line 82 def test_delete_with_namespace result = sb { delete.test.namespace("test") } assert_string(result, "delete test --namespace=test") end |
#test_describe ⇒ Object
vcluster describe test
126 127 128 129 |
# File 'lib/kube/vcluster/instance.rb', line 126 def test_describe result = sb { describe.test } assert_string(result, "describe test") end |
#test_describe_output_json ⇒ Object
vcluster describe -o json test
132 133 134 135 |
# File 'lib/kube/vcluster/instance.rb', line 132 def test_describe_output_json result = sb { describe.o("json").test } assert_string(result, "describe -o json test") end |
#test_disconnect ⇒ Object
vcluster disconnect
119 120 121 122 123 |
# File 'lib/kube/vcluster/instance.rb', line 119 def test_disconnect result = sb { disconnect } assert_buffer(result, [["disconnect", []]]) assert_string(result, "disconnect") end |
#test_list ⇒ Object
vcluster list
88 89 90 91 92 |
# File 'lib/kube/vcluster/instance.rb', line 88 def test_list result = sb { list } assert_buffer(result, [["list", []]]) assert_string(result, "list") end |
#test_list_namespace ⇒ Object
vcluster list –namespace test
101 102 103 104 |
# File 'lib/kube/vcluster/instance.rb', line 101 def test_list_namespace result = sb { list.namespace("test") } assert_string(result, "list --namespace=test") end |
#test_list_output_json ⇒ Object
vcluster list –output json
95 96 97 98 |
# File 'lib/kube/vcluster/instance.rb', line 95 def test_list_output_json result = sb { list.output("json") } assert_string(result, "list --output=json") end |
#test_logout ⇒ Object
vcluster logout
145 146 147 148 149 |
# File 'lib/kube/vcluster/instance.rb', line 145 def test_logout result = sb { logout } assert_buffer(result, [["logout", []]]) assert_string(result, "logout") end |
#test_pause_with_namespace ⇒ Object
vcluster pause test –namespace test
107 108 109 110 |
# File 'lib/kube/vcluster/instance.rb', line 107 def test_pause_with_namespace result = sb { pause.test.namespace("test") } assert_string(result, "pause test --namespace=test") end |
#test_platform_add_cluster ⇒ Object
522 523 524 525 |
# File 'lib/kube/vcluster/instance.rb', line 522 def test_platform_add_cluster result = sb { platform.add.cluster.my-cluster } assert_string(result, "platform add cluster my-cluster") end |
#test_platform_add_standalone ⇒ Object
537 538 539 540 |
# File 'lib/kube/vcluster/instance.rb', line 537 def test_platform_add_standalone result = sb { platform.add.standalone.my-cluster.project("my-project").access_key("my-access-key").host("https://my-vcluster-platform.com") } assert_string(result, "platform add standalone my-cluster --project=my-project --access-key=my-access-key --host=https://my-vcluster-platform.com") end |
#test_platform_add_vcluster_all ⇒ Object
532 533 534 535 |
# File 'lib/kube/vcluster/instance.rb', line 532 def test_platform_add_vcluster_all result = sb { platform.add.vcluster.project("my-project").all(true) } assert_string(result, "platform add vcluster --project=my-project --all") end |
#test_platform_add_vcluster_full ⇒ Object
527 528 529 530 |
# File 'lib/kube/vcluster/instance.rb', line 527 def test_platform_add_vcluster_full result = sb { platform.add.vcluster.my-vcluster.namespace("vcluster-my-vcluster").project("my-project").import_name("my-vcluster") } assert_string(result, "platform add vcluster my-vcluster --namespace=vcluster-my-vcluster --project=my-project --import-name=my-vcluster") end |
#test_platform_backup_management ⇒ Object
Platform — backup/reset/set/add
497 498 499 500 |
# File 'lib/kube/vcluster/instance.rb', line 497 def test_platform_backup_management result = sb { platform.backup.management } assert_string(result, "platform backup management") end |
#test_platform_connect_cluster ⇒ Object
Platform — connect
390 391 392 393 |
# File 'lib/kube/vcluster/instance.rb', line 390 def test_platform_connect_cluster result = sb { platform.connect.cluster.mycluster } assert_string(result, "platform connect cluster mycluster") end |
#test_platform_connect_management ⇒ Object
395 396 397 398 |
# File 'lib/kube/vcluster/instance.rb', line 395 def test_platform_connect_management result = sb { platform.connect.management } assert_string(result, "platform connect management") end |
#test_platform_connect_namespace ⇒ Object
400 401 402 403 |
# File 'lib/kube/vcluster/instance.rb', line 400 def test_platform_connect_namespace result = sb { platform.connect.namespace.myspace } assert_string(result, "platform connect namespace myspace") end |
#test_platform_connect_namespace_with_project ⇒ Object
405 406 407 408 |
# File 'lib/kube/vcluster/instance.rb', line 405 def test_platform_connect_namespace_with_project result = sb { platform.connect.namespace.myspace.project("myproject") } assert_string(result, "platform connect namespace myspace --project=myproject") end |
#test_platform_connect_vcluster ⇒ Object
410 411 412 413 |
# File 'lib/kube/vcluster/instance.rb', line 410 def test_platform_connect_vcluster result = sb { platform.connect.vcluster.test.namespace("test") } assert_string(result, "platform connect vcluster test --namespace=test") end |
#test_platform_connect_vcluster_exec_bash ⇒ Object
415 416 417 418 |
# File 'lib/kube/vcluster/instance.rb', line 415 def test_platform_connect_vcluster_exec_bash result = sb { platform.connect.vcluster.test.n("test").("-- bash") } assert_string(result, "platform connect vcluster test -n test -- bash") end |
#test_platform_connect_vcluster_exec_kubectl ⇒ Object
420 421 422 423 |
# File 'lib/kube/vcluster/instance.rb', line 420 def test_platform_connect_vcluster_exec_kubectl result = sb { platform.connect.vcluster.test.n("test").("-- kubectl get ns") } assert_string(result, "platform connect vcluster test -n test -- kubectl get ns") end |
#test_platform_create_accesskey ⇒ Object
352 353 354 355 |
# File 'lib/kube/vcluster/instance.rb', line 352 def test_platform_create_accesskey result = sb { platform.create.accesskey.test } assert_string(result, "platform create accesskey test") end |
#test_platform_create_accesskey_in_cluster ⇒ Object
362 363 364 365 |
# File 'lib/kube/vcluster/instance.rb', line 362 def test_platform_create_accesskey_in_cluster result = sb { platform.create.accesskey.test.in_cluster(true).user("admin") } assert_string(result, "platform create accesskey test --in-cluster --user=admin") end |
#test_platform_create_accesskey_vcluster_role ⇒ Object
357 358 359 360 |
# File 'lib/kube/vcluster/instance.rb', line 357 def test_platform_create_accesskey_vcluster_role result = sb { platform.create.accesskey.test.vcluster_role(true) } assert_string(result, "platform create accesskey test --vcluster-role") end |
#test_platform_create_namespace ⇒ Object
337 338 339 340 |
# File 'lib/kube/vcluster/instance.rb', line 337 def test_platform_create_namespace result = sb { platform.create.namespace.myspace } assert_string(result, "platform create namespace myspace") end |
#test_platform_create_namespace_with_project ⇒ Object
342 343 344 345 |
# File 'lib/kube/vcluster/instance.rb', line 342 def test_platform_create_namespace_with_project result = sb { platform.create.namespace.myspace.project("myproject") } assert_string(result, "platform create namespace myspace --project=myproject") end |
#test_platform_create_namespace_with_project_and_team ⇒ Object
347 348 349 350 |
# File 'lib/kube/vcluster/instance.rb', line 347 def test_platform_create_namespace_with_project_and_team result = sb { platform.create.namespace.myspace.project("myproject").team("myteam") } assert_string(result, "platform create namespace myspace --project=myproject --team=myteam") end |
#test_platform_create_vcluster ⇒ Object
Platform — create
332 333 334 335 |
# File 'lib/kube/vcluster/instance.rb', line 332 def test_platform_create_vcluster result = sb { platform.create.vcluster.test.namespace("test") } assert_string(result, "platform create vcluster test --namespace=test") end |
#test_platform_delete_namespace ⇒ Object
376 377 378 379 |
# File 'lib/kube/vcluster/instance.rb', line 376 def test_platform_delete_namespace result = sb { platform.delete.namespace.myspace } assert_string(result, "platform delete namespace myspace") end |
#test_platform_delete_namespace_with_project ⇒ Object
381 382 383 384 |
# File 'lib/kube/vcluster/instance.rb', line 381 def test_platform_delete_namespace_with_project result = sb { platform.delete.namespace.myspace.project("myproject") } assert_string(result, "platform delete namespace myspace --project=myproject") end |
#test_platform_delete_vcluster ⇒ Object
Platform — delete
371 372 373 374 |
# File 'lib/kube/vcluster/instance.rb', line 371 def test_platform_delete_vcluster result = sb { platform.delete.vcluster.namespace("test") } assert_string(result, "platform delete vcluster --namespace=test") end |
#test_platform_get_current_user ⇒ Object
Platform — get
313 314 315 316 |
# File 'lib/kube/vcluster/instance.rb', line 313 def test_platform_get_current_user result = sb { platform.get.current-user } assert_string(result, "platform get current-user") end |
#test_platform_get_secret ⇒ Object
318 319 320 321 |
# File 'lib/kube/vcluster/instance.rb', line 318 def test_platform_get_secret result = sb { platform.get.secret.("test-secret.key") } assert_string(result, "platform get secret test-secret.key") end |
#test_platform_get_secret_with_project ⇒ Object
323 324 325 326 |
# File 'lib/kube/vcluster/instance.rb', line 323 def test_platform_get_secret_with_project result = sb { platform.get.secret.("test-secret.key").project("myproject") } assert_string(result, "platform get secret test-secret.key --project=myproject") end |
#test_platform_list_clusters ⇒ Object
Platform — list
279 280 281 282 |
# File 'lib/kube/vcluster/instance.rb', line 279 def test_platform_list_clusters result = sb { platform.list.clusters } assert_string(result, "platform list clusters") end |
#test_platform_list_namespaces ⇒ Object
284 285 286 287 |
# File 'lib/kube/vcluster/instance.rb', line 284 def test_platform_list_namespaces result = sb { platform.list.namespaces } assert_string(result, "platform list namespaces") end |
#test_platform_list_projects ⇒ Object
289 290 291 292 |
# File 'lib/kube/vcluster/instance.rb', line 289 def test_platform_list_projects result = sb { platform.list.projects } assert_string(result, "platform list projects") end |
#test_platform_list_secrets ⇒ Object
294 295 296 297 |
# File 'lib/kube/vcluster/instance.rb', line 294 def test_platform_list_secrets result = sb { platform.list.secrets } assert_string(result, "platform list secrets") end |
#test_platform_list_teams ⇒ Object
299 300 301 302 |
# File 'lib/kube/vcluster/instance.rb', line 299 def test_platform_list_teams result = sb { platform.list.teams } assert_string(result, "platform list teams") end |
#test_platform_list_vclusters ⇒ Object
304 305 306 307 |
# File 'lib/kube/vcluster/instance.rb', line 304 def test_platform_list_vclusters result = sb { platform.list.vclusters } assert_string(result, "platform list vclusters") end |
#test_platform_login ⇒ Object
vcluster platform login my-vcluster-platform.com
252 253 254 255 |
# File 'lib/kube/vcluster/instance.rb', line 252 def test_platform_login result = sb { platform.login.("https://my-vcluster-platform.com") } assert_string(result, "platform login https://my-vcluster-platform.com") end |
#test_platform_login_with_access_key ⇒ Object
vcluster platform login my-vcluster-platform.com –access-key myaccesskey
258 259 260 261 |
# File 'lib/kube/vcluster/instance.rb', line 258 def test_platform_login_with_access_key result = sb { platform.login.("https://my-vcluster-platform.com").access_key("myaccesskey") } assert_string(result, "platform login https://my-vcluster-platform.com --access-key=myaccesskey") end |
#test_platform_logout ⇒ Object
vcluster platform logout
264 265 266 267 |
# File 'lib/kube/vcluster/instance.rb', line 264 def test_platform_logout result = sb { platform.logout } assert_string(result, "platform logout") end |
#test_platform_reset_password ⇒ Object
502 503 504 505 |
# File 'lib/kube/vcluster/instance.rb', line 502 def test_platform_reset_password result = sb { platform.reset.password } assert_string(result, "platform reset password") end |
#test_platform_reset_password_with_user ⇒ Object
507 508 509 510 |
# File 'lib/kube/vcluster/instance.rb', line 507 def test_platform_reset_password_with_user result = sb { platform.reset.password.user("admin") } assert_string(result, "platform reset password --user=admin") end |
#test_platform_set_secret ⇒ Object
512 513 514 515 |
# File 'lib/kube/vcluster/instance.rb', line 512 def test_platform_set_secret result = sb { platform.set.secret.("test-secret.key").("value") } assert_string(result, "platform set secret test-secret.key value") end |
#test_platform_set_secret_with_project ⇒ Object
517 518 519 520 |
# File 'lib/kube/vcluster/instance.rb', line 517 def test_platform_set_secret_with_project result = sb { platform.set.secret.("test-secret.key").("value").project("myproject") } assert_string(result, "platform set secret test-secret.key value --project=myproject") end |
#test_platform_share_namespace ⇒ Object
Platform — share
429 430 431 432 |
# File 'lib/kube/vcluster/instance.rb', line 429 def test_platform_share_namespace result = sb { platform.share.namespace.myspace } assert_string(result, "platform share namespace myspace") end |
#test_platform_share_namespace_with_project ⇒ Object
434 435 436 437 |
# File 'lib/kube/vcluster/instance.rb', line 434 def test_platform_share_namespace_with_project result = sb { platform.share.namespace.myspace.project("myproject") } assert_string(result, "platform share namespace myspace --project=myproject") end |
#test_platform_share_namespace_with_project_and_user ⇒ Object
439 440 441 442 |
# File 'lib/kube/vcluster/instance.rb', line 439 def test_platform_share_namespace_with_project_and_user result = sb { platform.share.namespace.myspace.project("myproject").user("admin") } assert_string(result, "platform share namespace myspace --project=myproject --user=admin") end |
#test_platform_share_vcluster ⇒ Object
444 445 446 447 |
# File 'lib/kube/vcluster/instance.rb', line 444 def test_platform_share_vcluster result = sb { platform.share.vcluster.myvcluster } assert_string(result, "platform share vcluster myvcluster") end |
#test_platform_share_vcluster_with_project ⇒ Object
449 450 451 452 |
# File 'lib/kube/vcluster/instance.rb', line 449 def test_platform_share_vcluster_with_project result = sb { platform.share.vcluster.myvcluster.project("myproject") } assert_string(result, "platform share vcluster myvcluster --project=myproject") end |
#test_platform_share_vcluster_with_project_and_user ⇒ Object
454 455 456 457 |
# File 'lib/kube/vcluster/instance.rb', line 454 def test_platform_share_vcluster_with_project_and_user result = sb { platform.share.vcluster.myvcluster.project("myproject").user("admin") } assert_string(result, "platform share vcluster myvcluster --project=myproject --user=admin") end |
#test_platform_sleep_namespace ⇒ Object
Platform — sleep/wakeup
463 464 465 466 |
# File 'lib/kube/vcluster/instance.rb', line 463 def test_platform_sleep_namespace result = sb { platform.sleep.namespace.myspace } assert_string(result, "platform sleep namespace myspace") end |
#test_platform_sleep_namespace_with_project ⇒ Object
468 469 470 471 |
# File 'lib/kube/vcluster/instance.rb', line 468 def test_platform_sleep_namespace_with_project result = sb { platform.sleep.namespace.myspace.project("myproject") } assert_string(result, "platform sleep namespace myspace --project=myproject") end |
#test_platform_sleep_vcluster ⇒ Object
473 474 475 476 |
# File 'lib/kube/vcluster/instance.rb', line 473 def test_platform_sleep_vcluster result = sb { platform.sleep.vcluster.test.namespace("test") } assert_string(result, "platform sleep vcluster test --namespace=test") end |
#test_platform_token ⇒ Object
vcluster platform token
270 271 272 273 |
# File 'lib/kube/vcluster/instance.rb', line 270 def test_platform_token result = sb { platform.token } assert_string(result, "platform token") end |
#test_platform_wakeup_namespace ⇒ Object
478 479 480 481 |
# File 'lib/kube/vcluster/instance.rb', line 478 def test_platform_wakeup_namespace result = sb { platform.wakeup.namespace.myspace } assert_string(result, "platform wakeup namespace myspace") end |
#test_platform_wakeup_namespace_with_project ⇒ Object
483 484 485 486 |
# File 'lib/kube/vcluster/instance.rb', line 483 def test_platform_wakeup_namespace_with_project result = sb { platform.wakeup.namespace.myspace.project("myproject") } assert_string(result, "platform wakeup namespace myspace --project=myproject") end |
#test_platform_wakeup_vcluster ⇒ Object
488 489 490 491 |
# File 'lib/kube/vcluster/instance.rb', line 488 def test_platform_wakeup_vcluster result = sb { platform.wakeup.vcluster.test.namespace("test") } assert_string(result, "platform wakeup vcluster test --namespace=test") end |
#test_restore_container ⇒ Object
vcluster restore my-vcluster container:///data/my-local-snapshot.tar.gz
242 243 244 245 |
# File 'lib/kube/vcluster/instance.rb', line 242 def test_restore_container result = sb { restore.my-vcluster.("container:///data/my-local-snapshot.tar.gz") } assert_string(result, "restore my-vcluster container:///data/my-local-snapshot.tar.gz") end |
#test_restore_oci ⇒ Object
vcluster restore my-vcluster oci://ghcr.io/my-user/my-repo:my-tag
230 231 232 233 |
# File 'lib/kube/vcluster/instance.rb', line 230 def test_restore_oci result = sb { restore.my-vcluster.("oci://ghcr.io/my-user/my-repo:my-tag") } assert_string(result, "restore my-vcluster oci://ghcr.io/my-user/my-repo:my-tag") end |
#test_restore_s3 ⇒ Object
vcluster restore my-vcluster s3://my-bucket/my-bucket-key
236 237 238 239 |
# File 'lib/kube/vcluster/instance.rb', line 236 def test_restore_s3 result = sb { restore.my-vcluster.("s3://my-bucket/my-bucket-key") } assert_string(result, "restore my-vcluster s3://my-bucket/my-bucket-key") end |
#test_resume_with_namespace ⇒ Object
vcluster resume test –namespace test
113 114 115 116 |
# File 'lib/kube/vcluster/instance.rb', line 113 def test_resume_with_namespace result = sb { resume.test.namespace("test") } assert_string(result, "resume test --namespace=test") end |
#test_snapshot_container ⇒ Object
vcluster snapshot my-vcluster container:///data/my-local-snapshot.tar.gz
184 185 186 187 |
# File 'lib/kube/vcluster/instance.rb', line 184 def test_snapshot_container result = sb { snapshot.my-vcluster.("container:///data/my-local-snapshot.tar.gz") } assert_string(result, "snapshot my-vcluster container:///data/my-local-snapshot.tar.gz") end |
#test_snapshot_create_container ⇒ Object
vcluster snapshot create my-vcluster container:///data/my-local-snapshot.tar.gz
202 203 204 205 |
# File 'lib/kube/vcluster/instance.rb', line 202 def test_snapshot_create_container result = sb { snapshot.create.my-vcluster.("container:///data/my-local-snapshot.tar.gz") } assert_string(result, "snapshot create my-vcluster container:///data/my-local-snapshot.tar.gz") end |
#test_snapshot_create_oci ⇒ Object
vcluster snapshot create my-vcluster oci://ghcr.io/my-user/my-repo:my-tag
190 191 192 193 |
# File 'lib/kube/vcluster/instance.rb', line 190 def test_snapshot_create_oci result = sb { snapshot.create.my-vcluster.("oci://ghcr.io/my-user/my-repo:my-tag") } assert_string(result, "snapshot create my-vcluster oci://ghcr.io/my-user/my-repo:my-tag") end |
#test_snapshot_create_s3 ⇒ Object
vcluster snapshot create my-vcluster s3://my-bucket/my-bucket-key
196 197 198 199 |
# File 'lib/kube/vcluster/instance.rb', line 196 def test_snapshot_create_s3 result = sb { snapshot.create.my-vcluster.("s3://my-bucket/my-bucket-key") } assert_string(result, "snapshot create my-vcluster s3://my-bucket/my-bucket-key") end |
#test_snapshot_get_container ⇒ Object
vcluster snapshot get my-vcluster container:///data/my-local-snapshot.tar.gz
220 221 222 223 |
# File 'lib/kube/vcluster/instance.rb', line 220 def test_snapshot_get_container result = sb { snapshot.get.my-vcluster.("container:///data/my-local-snapshot.tar.gz") } assert_string(result, "snapshot get my-vcluster container:///data/my-local-snapshot.tar.gz") end |
#test_snapshot_get_oci ⇒ Object
vcluster snapshot get my-vcluster oci://ghcr.io/my-user/my-repo:my-tag
208 209 210 211 |
# File 'lib/kube/vcluster/instance.rb', line 208 def test_snapshot_get_oci result = sb { snapshot.get.my-vcluster.("oci://ghcr.io/my-user/my-repo:my-tag") } assert_string(result, "snapshot get my-vcluster oci://ghcr.io/my-user/my-repo:my-tag") end |
#test_snapshot_get_s3 ⇒ Object
vcluster snapshot get my-vcluster s3://my-bucket/my-bucket-key
214 215 216 217 |
# File 'lib/kube/vcluster/instance.rb', line 214 def test_snapshot_get_s3 result = sb { snapshot.get.my-vcluster.("s3://my-bucket/my-bucket-key") } assert_string(result, "snapshot get my-vcluster s3://my-bucket/my-bucket-key") end |
#test_snapshot_oci ⇒ Object
vcluster snapshot my-vcluster oci://ghcr.io/my-user/my-repo:my-tag
172 173 174 175 |
# File 'lib/kube/vcluster/instance.rb', line 172 def test_snapshot_oci result = sb { snapshot.my-vcluster.("oci://ghcr.io/my-user/my-repo:my-tag") } assert_string(result, "snapshot my-vcluster oci://ghcr.io/my-user/my-repo:my-tag") end |
#test_snapshot_s3 ⇒ Object
vcluster snapshot my-vcluster s3://my-bucket/my-bucket-key
178 179 180 181 |
# File 'lib/kube/vcluster/instance.rb', line 178 def test_snapshot_s3 result = sb { snapshot.my-vcluster.("s3://my-bucket/my-bucket-key") } assert_string(result, "snapshot my-vcluster s3://my-bucket/my-bucket-key") end |
#test_ui ⇒ Object
vcluster ui
138 139 140 141 142 |
# File 'lib/kube/vcluster/instance.rb', line 138 def test_ui result = sb { ui } assert_buffer(result, [["ui", []]]) assert_string(result, "ui") end |