summaryrefslogtreecommitdiff
path: root/spec/config_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/config_spec.rb')
-rw-r--r--spec/config_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/config_spec.rb b/spec/config_spec.rb
new file mode 100644
index 0000000..f9b3980
--- /dev/null
+++ b/spec/config_spec.rb
@@ -0,0 +1,15 @@
+require 'serverspec_vyos_config'
+
+def config_spec
+ 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