Merge pull request #45260 from gtmanfred/oxygen

Make some kitchen-salt tests blue
This commit is contained in:
Gareth J. Greenaway 2018-01-03 18:25:22 -08:00 committed by GitHub
commit 8c53b94979
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View File

@ -13,7 +13,7 @@ driver:
use_sudo: false
hostname: salt
privileged: true
username: root
username: kitchen
volume:
- /var/run/docker.sock:/docker.sock
cap_add:
@ -22,17 +22,17 @@ driver:
provision_command:
- echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
transport:
name: sftp
name: rsync
<% end %>
sudo: true
provisioner:
name: salt_solo
salt_install: bootstrap
salt_version: latest
salt_bootstrap_url: https://bootstrap.saltstack.com
salt_bootstrap_options: -X stable <%= version %>
salt_bootstrap_options: -X -p rsync stable <%= version %>
log_level: info
sudo: true
require_chef: false
remote_states:
name: git://github.com/saltstack/salt-jenkins.git
@ -62,7 +62,7 @@ platforms:
image: fedora:latest
run_command: /usr/lib/systemd/systemd
provisioner:
salt_bootstrap_options: -X git v<%= version %> >/dev/null
salt_bootstrap_options: -X -p rsync git v<%= version %> >/dev/null
- name: centos-7
driver_config:
run_command: /usr/lib/systemd/systemd
@ -72,7 +72,7 @@ platforms:
provision_command:
- yum install -y upstart
provisioner:
salt_bootstrap_options: -P -y -x python2.7 -X git v<%= version %> >/dev/null
salt_bootstrap_options: -P -p rsync -y -x python2.7 -X git v<%= version %> >/dev/null
- name: ubuntu-rolling
driver_config:
image: ubuntu:rolling
@ -106,7 +106,7 @@ platforms:
- systemctl enable sshd
- echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
provisioner:
salt_bootstrap_options: -X git v<%= version %> >/dev/null
salt_bootstrap_options: -X -p rsync git v<%= version %> >/dev/null
- name: opensuse
driver_config:
run_command: /usr/lib/systemd/systemd
@ -114,7 +114,7 @@ platforms:
- systemctl enable sshd.service
- echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
provisioner:
salt_bootstrap_options: -X git v<%= version %> >/dev/null
salt_bootstrap_options: -X -p rsync git v<%= version %> >/dev/null
<% if vagrant != false %>
- name: windows-2012r2
driver:

View File

@ -125,6 +125,10 @@ class RunnerReturnsTest(ShellCase):
self.clean_return(deserialized['return'])
# Now we have something sane we can reliably compare in an assert.
if 'SUDO_USER' in os.environ:
user = 'sudo_{0}'.format(os.environ['SUDO_USER'])
else:
user = RUNTIME_VARS.RUNNING_TESTS_USER
self.assertEqual(
deserialized,
{'return': {'fun': 'runner.test.arg',
@ -132,5 +136,5 @@ class RunnerReturnsTest(ShellCase):
'jid': jid,
'return': {'args': ['foo'], 'kwargs': {'bar': 'hello world!'}},
'success': True,
'user': RUNTIME_VARS.RUNNING_TESTS_USER if 'SUDO_USER' not in os.environ else 'root'}}
'user': user}}
)