Class: Rhelm::Subcommand::Test

Inherits:
Base
  • Object
show all
Defined in:
lib/rhelm/subcommand/test.rb

Overview

Helm test subcommand: ‘helm test [RELEASE] [flags]`. docs: helm.sh/docs/helm/helm_test/

Instance Attribute Summary collapse

Attributes inherited from Base

#client, #debug, #kube_apiserver, #kube_as_group, #kube_as_user, #kube_context, #kube_token, #kubeconfig, #namespace, #registry_config, #repository_cache, #repository_config

Instance Method Summary collapse

Methods inherited from Base

#args, #full_cli_call, #report_failure, #run

Constructor Details

#initialize(release, options = {}) ⇒ Test

Returns a new instance of Test.



13
14
15
16
17
18
19
20
# File 'lib/rhelm/subcommand/test.rb', line 13

def initialize(release, options = {})
  super(options)

  @release = options[:release]
  @help = options[:help]
  @logs = options[:logs]
  @timeout = options[:timeout]
end

Instance Attribute Details

#helpObject (readonly)

Returns the value of attribute help.



8
9
10
# File 'lib/rhelm/subcommand/test.rb', line 8

def help
  @help
end

#logsObject (readonly)

Returns the value of attribute logs.



8
9
10
# File 'lib/rhelm/subcommand/test.rb', line 8

def logs
  @logs
end

#releaseObject (readonly)

Returns the value of attribute release.



8
9
10
# File 'lib/rhelm/subcommand/test.rb', line 8

def release
  @release
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



8
9
10
# File 'lib/rhelm/subcommand/test.rb', line 8

def timeout
  @timeout
end

Instance Method Details

#cli_argsObject



26
27
28
29
30
31
32
33
34
# File 'lib/rhelm/subcommand/test.rb', line 26

def cli_args
  super.tap do |args|
    args << '--help' if help
    args << '--logs' if logs
    args << ['--timeout', timeout] if timeout

    args << release
  end.flatten
end

#subcommand_nameObject



22
23
24
# File 'lib/rhelm/subcommand/test.rb', line 22

def subcommand_name
  "test"
end