summaryrefslogtreecommitdiffstats
path: root/testsuite/Testsrc/Testlib/TestServer/TestPlugins
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2016-09-12 10:44:11 -0500
committerSol Jerome <sol.jerome@gmail.com>2016-09-12 10:44:11 -0500
commita24fd9e6966e70014ea776ac266350f902833b1e (patch)
treec3ef9b384ab948c6bbed8e0fa2f58d36fd3b7d5c /testsuite/Testsrc/Testlib/TestServer/TestPlugins
parentbf2dfbbebcf17840319955697d3a5edf4eb85960 (diff)
parentb90204c1ed3380671cd5f887e35fd2e74700eaee (diff)
downloadbcfg2-a24fd9e6966e70014ea776ac266350f902833b1e.tar.gz
bcfg2-a24fd9e6966e70014ea776ac266350f902833b1e.tar.bz2
bcfg2-a24fd9e6966e70014ea776ac266350f902833b1e.zip
Merge branch 'fix/testsuite/db-tests' of https://github.com/AlexanderS/bcfg2
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestServer/TestPlugins')
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestMetadata.py4
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestMetadata.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestMetadata.py
index f2721c9ea..5d7ed50b7 100644
--- a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestMetadata.py
+++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestMetadata.py
@@ -123,7 +123,7 @@ class TestClientVersions(TestDatabaseBacked):
def setUp(self):
TestDatabaseBacked.setUp(self)
self.test_obj = ClientVersions
- syncdb(TestMetadataDB)
+ self.syncdb(TestMetadataDB)
for client, version in self.test_clients.items():
MetadataClientModel(hostname=client, version=version).save()
@@ -1252,7 +1252,7 @@ class TestMetadataBase(TestMetadata):
TestClientRunHooks.setUp(self)
TestDatabaseBacked.setUp(self)
Bcfg2.Options.setup.metadata_db = True
- syncdb(TestMetadataDB)
+ self.syncdb(TestMetadataDB)
def load_clients_data(self, metadata=None, xdata=None):
if metadata is None:
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py
index 32766b5c1..9729a0449 100644
--- a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py
+++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py
@@ -201,7 +201,7 @@ group-specific"""
assert False, "Strange probe found in get_probe_data() return"
-class TestProbes(TestPlugin):
+class TestProbes(TestDatabaseBacked):
test_obj = Probes
test_xdata = lxml.etree.Element("test")
@@ -241,7 +241,7 @@ group: group:with:colons
self.datastore = None
Bcfg2.Options.setup.repository = datastore
- def get_obj(self):
+ def get_obj(self, core=None):
if not Bcfg2.Options.setup.probes_db:
# actually use a real datastore so we can read and write
# probed.xml
@@ -251,7 +251,7 @@ group: group:with:colons
datadir = os.path.join(self.datastore, self.test_obj.name)
if not os.path.exists(datadir):
os.makedirs(datadir)
- return TestPlugin.get_obj(self)
+ return TestPlugin.get_obj(self, core)
def test__init(self):
if Bcfg2.Options.setup.probes_db:
@@ -278,7 +278,7 @@ group: group:with:colons
def test_probes_db(self):
""" Set and retrieve probe data with database enabled """
Bcfg2.Options.setup.probes_db = True
- syncdb(TestProbesDB)
+ self.syncdb(TestProbesDB)
self._perform_tests()
def test_allowed_cgroups(self):