Skip to content

Commit

Permalink
Set env var late prior to @libzypplocked
Browse files Browse the repository at this point in the history
  • Loading branch information
wstephenson committed Oct 7, 2016
1 parent 70e6324 commit fa8bdcd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions features/step_definition/helper_steps.rb
Expand Up @@ -12,8 +12,8 @@ def base_product_version
# base_product_version will fail if libzypp is locked for testing
# so use env vars if available
case ENV['PRODUCT']
when 'SLE_12'
'12-0'
when 'SLE_12', 'SLES_12' # for @libzypplocked case
'12'
when 'SLE_12_SP1'
'12.1'
when 'SLE_12_SP2'
Expand Down
3 changes: 3 additions & 0 deletions features/support/env.rb
Expand Up @@ -11,9 +11,12 @@

Before('@libzypplocked') do
# this should put the pid of the cucumber process into the lockfile
@old_product_env_var_contents = ENV['PRODUCT']
ENV['PRODUCT'] = SUSE::Connect::Zypper.base_product.identifier + '_' + SUSE::Connect::Zypper.base_product.version
`echo $PPID > /var/run/zypp.pid`
end

After('@libzypplocked') do
`rm /var/run/zypp.pid`
ENV['PRODUCT'] = @old_product_env_var_contents
end
2 changes: 1 addition & 1 deletion prophet/.prophet_ci.yml
Expand Up @@ -2,4 +2,4 @@ projects:

connect:
docker-build-image: cd ..; docker build -t connect .
docker-run-tests: cd ..; docker run -e "PRODUCT=SLE_12" --privileged --rm -t connect ./docker/prophet_tests.sh
docker-run-tests: cd ..; docker run --privileged --rm -t connect ./docker/prophet_tests.sh

0 comments on commit fa8bdcd

Please sign in to comment.