From 3546f8814870d61f446ca7005e5c12ea6f78f184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20B=C3=A9rtoli?= Date: Wed, 10 Jul 2019 12:10:01 -0300 Subject: [PATCH] fix(tests): use --versions-report to check the correct python version is used --- test/integration/controls/salt_pkgs.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/integration/controls/salt_pkgs.rb b/test/integration/controls/salt_pkgs.rb index 80aec66..8abbaed 100644 --- a/test/integration/controls/salt_pkgs.rb +++ b/test/integration/controls/salt_pkgs.rb @@ -1,10 +1,20 @@ -version = input('salt_version') == 'develop' ? 'Fluorine' : input('salt_version') +salt_version = input('salt_version') == 'develop' ? 'Fluorine' : input('salt_version') +python_version = input('py_version') == '3' ? '3' : '2' control 'salt call' do title 'should be installed' describe command('salt-call --version') do - its('stdout') { should match /#{version}/ } + its('stdout') { should match /#{salt_version}/ } + its('exit_status') { should eq 0 } + end +end + +control 'salt packages' do + title 'should be using the desired python' + + describe command('salt-call --versions-report') do + its('stdout') { should match /Python: #{python_version}/ } its('exit_status') { should eq 0 } end end