summaryrefslogtreecommitdiff
path: root/spec/config_spec.rb
blob: dc9edd897fa73fa6ab16ce958e746444490c2bd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'serverspec_vyos_config'

shared_examples_for 'config_spec' do
  test = ENV['TARGET_TEST']
  host = ENV['TARGET_HOST']

  File.open("spec/#{test}/#{host}_script.sh") do |file|
    file.each_line do |l|
      next unless l.start_with?('set')
      describe vyos_config(l.gsub(/set /, '')) do
        it { should be_exists }
      end
    end
  end
end