aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/test.rb
blob: dc086522281e734a04b8752f0e57c4a11e6673f6 (plain)
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
module LeapCli; module Commands

  desc 'Creates files needed to run tests'
  command :'init-test' do |c|
    c.action do |global_options,options,args|
      generate_test_client_cert
      generate_test_client_openvpn_config
    end
  end

  desc 'Run tests'
  command :test do |c|
    c.action do |global_options,options,args|
      log 'not yet implemented'
    end
  end

  private

  def generate_test_client_openvpn_config
    template = read_file! Path.find_file(:test_client_openvpn_template)
    config = Util.erb_eval(template, binding)
    write_file! :test_client_openvpn_config, config
  end

end; end