mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-17 10:10:25 +00:00
Merge branch 'develop' of github.com:saltstack/salt-bootstrap into issues/57
This commit is contained in:
commit
a7cbde0883
3 changed files with 49 additions and 35 deletions
|
@ -722,9 +722,15 @@ __git_clone_and_checkout() {
|
|||
SALT_GIT_CHECKOUT_DIR=/tmp/git/salt
|
||||
[ -d /tmp/git ] || mkdir /tmp/git
|
||||
cd /tmp/git
|
||||
[ -d $SALT_GIT_CHECKOUT_DIR ] || git clone https://github.com/saltstack/salt.git salt
|
||||
cd salt
|
||||
git checkout $GIT_REV
|
||||
if [ -d $SALT_GIT_CHECKOUT_DIR ]; then
|
||||
cd $SALT_GIT_CHECKOUT_DIR
|
||||
git fetch
|
||||
git reset --hard origin/$GIT_REV
|
||||
else
|
||||
git clone https://github.com/saltstack/salt.git salt
|
||||
cd $SALT_GIT_CHECKOUT_DIR
|
||||
git checkout $GIT_REV
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,12 +29,13 @@ CLEANUP_COMMANDS_BY_OS_FAMILY = {
|
|||
],
|
||||
'Debian': [
|
||||
'apt-get remove -y -o DPkg::Options::=--force-confold '
|
||||
'--purge salt-master salt-minion salt-syndic',
|
||||
'--purge salt-master salt-minion salt-syndic python-crypto '
|
||||
'python-jinja2 python-m2crypto python-yaml msgpack-python python-zmq',
|
||||
'apt-get autoremove -y -o DPkg::Options::=--force-confold --purge'
|
||||
],
|
||||
'RedHat': [
|
||||
'yum -y remove salt-minion salt-master',
|
||||
'yum -y remove git python{0}-m2crypto m2crypto python{0}-crypto '
|
||||
'yum -y remove python{0}-m2crypto m2crypto python{0}-crypto '
|
||||
'python{0}-msgpack python{0}-zmq python{0}-jinja2'.format(
|
||||
GRAINS['osrelease'].split('.')[0] == '5' and '26' or ''
|
||||
),
|
||||
|
@ -289,34 +290,34 @@ class InstallationTestCase(BootstrapTestCase):
|
|||
)
|
||||
)
|
||||
|
||||
def test_install_latest_from_git_develop(self):
|
||||
args = []
|
||||
if GRAINS['os'] in OS_REQUIRES_PIP_ALLOWED:
|
||||
args.append('-P')
|
||||
|
||||
args.extend(['git', 'develop'])
|
||||
|
||||
self.assert_script_result(
|
||||
'Failed to install using latest git develop',
|
||||
0,
|
||||
self.run_script(
|
||||
args=args,
|
||||
timeout=15 * 60,
|
||||
stream_stds=True
|
||||
)
|
||||
)
|
||||
|
||||
# Try to get the versions report
|
||||
self.assert_script_result(
|
||||
'Failed to get the versions report (\'--versions-report\')',
|
||||
0,
|
||||
self.run_script(
|
||||
script=None,
|
||||
args=('salt', '--versions-report'),
|
||||
timeout=15 * 60,
|
||||
stream_stds=True
|
||||
)
|
||||
)
|
||||
#def test_install_latest_from_git_develop(self):
|
||||
# args = []
|
||||
# if GRAINS['os'] in OS_REQUIRES_PIP_ALLOWED:
|
||||
# args.append('-P')
|
||||
#
|
||||
# args.extend(['git', 'develop'])
|
||||
#
|
||||
# self.assert_script_result(
|
||||
# 'Failed to install using latest git develop',
|
||||
# 0,
|
||||
# self.run_script(
|
||||
# args=args,
|
||||
# timeout=15 * 60,
|
||||
# stream_stds=True
|
||||
# )
|
||||
# )
|
||||
#
|
||||
# # Try to get the versions report
|
||||
# self.assert_script_result(
|
||||
# 'Failed to get the versions report (\'--versions-report\')',
|
||||
# 0,
|
||||
# self.run_script(
|
||||
# script=None,
|
||||
# args=('salt', '--versions-report'),
|
||||
# timeout=15 * 60,
|
||||
# stream_stds=True
|
||||
# )
|
||||
# )
|
||||
|
||||
def test_install_specific_git_tag(self):
|
||||
args = []
|
||||
|
|
|
@ -67,10 +67,17 @@ elif GRAINS['os'] == 'Amazon':
|
|||
'yum -y install python-pip --enablerepo=epel-testing',
|
||||
'pip-python install unittest2'
|
||||
])
|
||||
elif GRAINS['os'] == 'Fedora':
|
||||
COMMANDS.extend([
|
||||
'yum -y update',
|
||||
'yum -y install python-pip',
|
||||
'pip-python install unittest2'
|
||||
])
|
||||
elif GRAINS['os_family'] == 'Debian':
|
||||
COMMANDS.extend([
|
||||
'apt-get install -y -o Dpkg::Options::="--force-confdef" '
|
||||
'-o Dpkg::Options::="--force-confold" git python-pip',
|
||||
'apt-get update',
|
||||
'apt-get install -y -o DPkg::Options::=--force-confold '
|
||||
'-o Dpkg::Options::="--force-confdef" python-pip',
|
||||
'pip install unittest2'
|
||||
])
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue