|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
diff --git a/tests/unit/modules/artifactory_test.py b/tests/unit/modules/artifactory_test.py
|
|
|
|
|
index 33774e3..11faa22 100644
|
|
|
|
|
--- a/tests/unit/modules/artifactory_test.py
|
|
|
|
|
+++ b/tests/unit/modules/artifactory_test.py
|
|
|
|
|
diff -ur a/tests/unit/modules/artifactory_test.py b/tests/unit/modules/artifactory_test.py
|
|
|
|
|
--- a/tests/unit/modules/artifactory_test.py 2015-05-22 13:58:40.000000000 -0500
|
|
|
|
|
+++ b/tests/unit/modules/artifactory_test.py 2015-05-27 11:58:17.306821711 -0500
|
|
|
|
|
@@ -1,9 +1,10 @@
|
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
from salt.modules import artifactory
|
|
|
|
@ -14,11 +13,10 @@ index 33774e3..11faa22 100644
|
|
|
|
|
class ArtifactoryTestCase(TestCase):
|
|
|
|
|
|
|
|
|
|
org_module_functions = {}
|
|
|
|
|
diff --git a/tests/unit/modules/gpg_test.py b/tests/unit/modules/gpg_test.py
|
|
|
|
|
index a787853..158387c 100644
|
|
|
|
|
--- a/tests/unit/modules/gpg_test.py
|
|
|
|
|
+++ b/tests/unit/modules/gpg_test.py
|
|
|
|
|
@@ -16,7 +16,11 @@ from salttesting.mock import (
|
|
|
|
|
diff -ur a/tests/unit/modules/gpg_test.py b/tests/unit/modules/gpg_test.py
|
|
|
|
|
--- a/tests/unit/modules/gpg_test.py 2015-05-22 13:58:40.000000000 -0500
|
|
|
|
|
+++ b/tests/unit/modules/gpg_test.py 2015-05-27 11:58:17.306821711 -0500
|
|
|
|
|
@@ -16,7 +16,11 @@
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
from salttesting.helpers import ensure_in_syspath
|
|
|
|
@ -31,7 +29,7 @@ index a787853..158387c 100644
|
|
|
|
|
|
|
|
|
|
ensure_in_syspath('../../')
|
|
|
|
|
|
|
|
|
|
@@ -315,6 +319,7 @@ class GpgTestCase(TestCase):
|
|
|
|
|
@@ -315,6 +319,7 @@
|
|
|
|
|
|
|
|
|
|
# 'import_key' function tests: 1
|
|
|
|
|
|
|
|
|
@ -39,10 +37,9 @@ index a787853..158387c 100644
|
|
|
|
|
def test_import_key(self):
|
|
|
|
|
'''
|
|
|
|
|
Tests if it import a key from text or file.
|
|
|
|
|
diff --git a/tests/unit/modules/groupadd_test.py b/tests/unit/modules/groupadd_test.py
|
|
|
|
|
index 7b7254e..b616388 100644
|
|
|
|
|
--- a/tests/unit/modules/groupadd_test.py
|
|
|
|
|
+++ b/tests/unit/modules/groupadd_test.py
|
|
|
|
|
diff -ur a/tests/unit/modules/groupadd_test.py b/tests/unit/modules/groupadd_test.py
|
|
|
|
|
--- a/tests/unit/modules/groupadd_test.py 2015-05-22 13:58:40.000000000 -0500
|
|
|
|
|
+++ b/tests/unit/modules/groupadd_test.py 2015-05-27 11:58:17.310155121 -0500
|
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
@ -52,7 +49,7 @@ index 7b7254e..b616388 100644
|
|
|
|
|
from salttesting.mock import MagicMock, patch
|
|
|
|
|
#-------- from salt.exceptions import SaltInvocationError, CommandExecutionError
|
|
|
|
|
|
|
|
|
|
@@ -15,6 +15,7 @@ from salt.modules import groupadd
|
|
|
|
|
@@ -15,6 +15,7 @@
|
|
|
|
|
import grp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -60,11 +57,10 @@ index 7b7254e..b616388 100644
|
|
|
|
|
class GroupAddTestCase(TestCase):
|
|
|
|
|
'''
|
|
|
|
|
TestCase for salt.modules.groupadd
|
|
|
|
|
diff --git a/tests/unit/modules/jboss7_test.py b/tests/unit/modules/jboss7_test.py
|
|
|
|
|
index ec83a8b..9a333cc 100644
|
|
|
|
|
--- a/tests/unit/modules/jboss7_test.py
|
|
|
|
|
+++ b/tests/unit/modules/jboss7_test.py
|
|
|
|
|
@@ -4,7 +4,7 @@ from salt.utils.odict import OrderedDict
|
|
|
|
|
diff -ur a/tests/unit/modules/jboss7_test.py b/tests/unit/modules/jboss7_test.py
|
|
|
|
|
--- a/tests/unit/modules/jboss7_test.py 2015-05-22 13:58:40.000000000 -0500
|
|
|
|
|
+++ b/tests/unit/modules/jboss7_test.py 2015-05-27 11:58:17.310155121 -0500
|
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
|
|
|
|
from salt.modules import jboss7
|
|
|
|
|
|
|
|
|
@ -73,7 +69,7 @@ index ec83a8b..9a333cc 100644
|
|
|
|
|
from salttesting.mock import MagicMock
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
@@ -15,6 +15,7 @@ except NameError:
|
|
|
|
|
@@ -15,6 +15,7 @@
|
|
|
|
|
__builtin__.__salt__ = {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -81,11 +77,10 @@ index ec83a8b..9a333cc 100644
|
|
|
|
|
class JBoss7TestCase(TestCase):
|
|
|
|
|
jboss_config = {}
|
|
|
|
|
org_run_operation = None
|
|
|
|
|
diff --git a/tests/unit/modules/rh_ip_test.py b/tests/unit/modules/rh_ip_test.py
|
|
|
|
|
index 7e32fdf..6f953be 100644
|
|
|
|
|
--- a/tests/unit/modules/rh_ip_test.py
|
|
|
|
|
+++ b/tests/unit/modules/rh_ip_test.py
|
|
|
|
|
@@ -32,6 +32,7 @@ class RhipTestCase(TestCase):
|
|
|
|
|
diff -ur a/tests/unit/modules/rh_ip_test.py b/tests/unit/modules/rh_ip_test.py
|
|
|
|
|
--- a/tests/unit/modules/rh_ip_test.py 2015-05-22 13:58:25.000000000 -0500
|
|
|
|
|
+++ b/tests/unit/modules/rh_ip_test.py 2015-05-27 11:58:17.313488533 -0500
|
|
|
|
|
@@ -32,6 +32,7 @@
|
|
|
|
|
'''
|
|
|
|
|
Test cases for salt.modules.rh_ip
|
|
|
|
|
'''
|
|
|
|
@ -93,11 +88,10 @@ index 7e32fdf..6f953be 100644
|
|
|
|
|
def test_build_bond(self):
|
|
|
|
|
'''
|
|
|
|
|
Test to create a bond script in /etc/modprobe.d with the passed
|
|
|
|
|
diff --git a/tests/unit/modules/win_network_test.py b/tests/unit/modules/win_network_test.py
|
|
|
|
|
index effafd6..ee3e000 100644
|
|
|
|
|
--- a/tests/unit/modules/win_network_test.py
|
|
|
|
|
+++ b/tests/unit/modules/win_network_test.py
|
|
|
|
|
@@ -172,7 +172,7 @@ class WinNetworkTestCase(TestCase):
|
|
|
|
|
diff -ur a/tests/unit/modules/win_network_test.py b/tests/unit/modules/win_network_test.py
|
|
|
|
|
--- a/tests/unit/modules/win_network_test.py 2015-05-22 13:58:25.000000000 -0500
|
|
|
|
|
+++ b/tests/unit/modules/win_network_test.py 2015-05-27 11:58:17.313488533 -0500
|
|
|
|
|
@@ -172,7 +172,7 @@
|
|
|
|
|
['Ethernet'])
|
|
|
|
|
|
|
|
|
|
# 'interfaces' function tests: 1
|
|
|
|
@ -106,7 +100,7 @@ index effafd6..ee3e000 100644
|
|
|
|
|
def test_interfaces(self):
|
|
|
|
|
'''
|
|
|
|
|
Test if it return information about all the interfaces on the minion
|
|
|
|
|
@@ -213,6 +213,7 @@ class WinNetworkTestCase(TestCase):
|
|
|
|
|
@@ -215,6 +215,7 @@
|
|
|
|
|
|
|
|
|
|
# 'ip_addrs' function tests: 1
|
|
|
|
|
|
|
|
|
@ -114,7 +108,7 @@ index effafd6..ee3e000 100644
|
|
|
|
|
def test_ip_addrs(self):
|
|
|
|
|
'''
|
|
|
|
|
Test if it returns a list of IPv4 addresses assigned to the host.
|
|
|
|
|
@@ -221,6 +222,7 @@ class WinNetworkTestCase(TestCase):
|
|
|
|
|
@@ -223,6 +224,7 @@
|
|
|
|
|
|
|
|
|
|
# 'ip_addrs6' function tests: 1
|
|
|
|
|
|
|
|
|
@ -122,11 +116,11 @@ index effafd6..ee3e000 100644
|
|
|
|
|
def test_ip_addrs6(self):
|
|
|
|
|
'''
|
|
|
|
|
Test if it returns a list of IPv6 addresses assigned to the host.
|
|
|
|
|
diff --git a/tests/unit/pydsl_test.py b/tests/unit/pydsl_test.py
|
|
|
|
|
index a1dbda6..9b1beed 100644
|
|
|
|
|
--- a/tests/unit/pydsl_test.py
|
|
|
|
|
+++ b/tests/unit/pydsl_test.py
|
|
|
|
|
@@ -10,7 +10,7 @@ import copy
|
|
|
|
|
Only in b/tests/unit/modules: win_network_test.py.orig
|
|
|
|
|
diff -ur a/tests/unit/pydsl_test.py b/tests/unit/pydsl_test.py
|
|
|
|
|
--- a/tests/unit/pydsl_test.py 2015-05-22 13:58:40.000000000 -0500
|
|
|
|
|
+++ b/tests/unit/pydsl_test.py 2015-05-27 11:58:17.313488533 -0500
|
|
|
|
|
@@ -10,7 +10,7 @@
|
|
|
|
|
from cStringIO import StringIO
|
|
|
|
|
|
|
|
|
|
# Import Salt Testing libs
|
|
|
|
@ -135,7 +129,7 @@ index a1dbda6..9b1beed 100644
|
|
|
|
|
from salttesting.helpers import ensure_in_syspath
|
|
|
|
|
|
|
|
|
|
ensure_in_syspath('../')
|
|
|
|
|
@@ -299,6 +299,7 @@ class PyDSLRendererTestCase(TestCase):
|
|
|
|
|
@@ -299,6 +299,7 @@
|
|
|
|
|
finally:
|
|
|
|
|
shutil.rmtree(dirpath, ignore_errors=True)
|
|
|
|
|
|
|
|
|
@ -143,11 +137,10 @@ index a1dbda6..9b1beed 100644
|
|
|
|
|
def test_rendering_includes(self):
|
|
|
|
|
dirpath = tempfile.mkdtemp(dir=integration.SYS_TMP_DIR)
|
|
|
|
|
if not os.path.isdir(dirpath):
|
|
|
|
|
diff --git a/tests/unit/states/archive_test.py b/tests/unit/states/archive_test.py
|
|
|
|
|
index 588ec1a..acd53fa 100644
|
|
|
|
|
--- a/tests/unit/states/archive_test.py
|
|
|
|
|
+++ b/tests/unit/states/archive_test.py
|
|
|
|
|
@@ -78,9 +78,7 @@ class ArchiveTest(TestCase):
|
|
|
|
|
diff -ur a/tests/unit/states/archive_test.py b/tests/unit/states/archive_test.py
|
|
|
|
|
--- a/tests/unit/states/archive_test.py 2015-05-22 13:58:40.000000000 -0500
|
|
|
|
|
+++ b/tests/unit/states/archive_test.py 2015-05-27 11:58:17.316821944 -0500
|
|
|
|
|
@@ -78,9 +78,7 @@
|
|
|
|
|
running_as = 'root'
|
|
|
|
|
filename = os.path.join(
|
|
|
|
|
tmp_dir,
|
|
|
|
@ -158,10 +151,9 @@ index 588ec1a..acd53fa 100644
|
|
|
|
|
)
|
|
|
|
|
for test_opts, ret_opts in zip(test_tar_opts, ret_tar_opts):
|
|
|
|
|
ret = archive.extracted(tmp_dir,
|
|
|
|
|
diff --git a/tests/unit/states/jboss7_test.py b/tests/unit/states/jboss7_test.py
|
|
|
|
|
index c1cda69..ae205f8 100644
|
|
|
|
|
--- a/tests/unit/states/jboss7_test.py
|
|
|
|
|
+++ b/tests/unit/states/jboss7_test.py
|
|
|
|
|
diff -ur a/tests/unit/states/jboss7_test.py b/tests/unit/states/jboss7_test.py
|
|
|
|
|
--- a/tests/unit/states/jboss7_test.py 2015-05-22 13:58:40.000000000 -0500
|
|
|
|
|
+++ b/tests/unit/states/jboss7_test.py 2015-05-27 11:58:17.316821944 -0500
|
|
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
-from salttesting import TestCase
|
|
|
|
@ -169,7 +161,7 @@ index c1cda69..ae205f8 100644
|
|
|
|
|
from salttesting.mock import MagicMock
|
|
|
|
|
from salt.states import jboss7
|
|
|
|
|
from salt.exceptions import CommandExecutionError
|
|
|
|
|
@@ -13,6 +13,7 @@ except NameError:
|
|
|
|
|
@@ -13,6 +13,7 @@
|
|
|
|
|
__builtin__.__salt__ = {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -177,3 +169,22 @@ index c1cda69..ae205f8 100644
|
|
|
|
|
class JBoss7StateTestCase(TestCase):
|
|
|
|
|
|
|
|
|
|
org_module_functions = {}
|
|
|
|
|
diff -ur a/tests/unit/states/libvirt_test.py b/tests/unit/states/libvirt_test.py
|
|
|
|
|
--- a/tests/unit/states/libvirt_test.py 2015-05-22 13:58:26.000000000 -0500
|
|
|
|
|
+++ b/tests/unit/states/libvirt_test.py 2015-05-27 11:59:35.588649849 -0500
|
|
|
|
|
@@ -4,6 +4,7 @@
|
|
|
|
|
'''
|
|
|
|
|
# Import Python libs
|
|
|
|
|
from __future__ import absolute_import
|
|
|
|
|
+import os
|
|
|
|
|
|
|
|
|
|
# Import Salt Testing Libs
|
|
|
|
|
from salttesting import skipIf, TestCase
|
|
|
|
|
@@ -33,6 +34,7 @@
|
|
|
|
|
'''
|
|
|
|
|
# 'keys' function tests: 1
|
|
|
|
|
|
|
|
|
|
+ @skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
|
|
|
|
@patch('os.path.isfile', MagicMock(return_value=False))
|
|
|
|
|
def test_keys(self):
|
|
|
|
|
'''
|
|
|
|
|