From 3ff8614cc72c3e7d9b77f55792094c36d19801bd Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Wed, 5 Aug 2020 14:22:09 +0300 Subject: [PATCH] tests: Push example blueprints b/c they may not exist Related: rhbz#1825190 --- tests/composer/test_blueprints.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/composer/test_blueprints.py b/tests/composer/test_blueprints.py index f9b5ceeb..82f791f9 100644 --- a/tests/composer/test_blueprints.py +++ b/tests/composer/test_blueprints.py @@ -121,6 +121,16 @@ dict_name_results3 = "/root, /home/norm, /home/cliff" class BlueprintsTest(unittest.TestCase): + @unittest.skipUnless(os.path.exists("/run/weldr/api.socket"), "Setup requires a running API server") + @classmethod + def setUpClass(cls): + """ + Make sure that example blueprints are pushed to the server! + """ + rc = blueprints_push("/run/weldr/api.socket", 0, + ["example-http-server.toml", "example-development.toml"], show_json=False) + assert rc == 0 + def test_pretty_diff_entry(self): """Return a nice representation of a diff entry""" self.assertEqual([pretty_diff_entry(entry) for entry in diff_entries], diff_result)