Unfortunately the test doesn't indicate why netplan apply failed.
Maybe something like this might give more info?
diff --git a/tests/integration/base.py b/tests/integration/base.py
index 5042bf4..c8902ca 100644
--- a/tests/integration/base.py
+++ b/tests/integration/base.py
@@ -297,7 +297,12 @@ class IntegrationTestsBase(unittest.TestCase): '''Generate config, launch and settle NM and networkd'''
# regenerate netplan config
- out = subprocess.check_output(['netplan', 'apply'], stderr=subprocess.STDOUT, universal_newlines=True)
+ try:
+ out = subprocess.check_output(['netplan', 'apply'], stderr=subprocess.STDOUT, universal_newlines=True)
+ except subprocess.CalledProcessError as e:
+ sys.stderr.write('%d: %s\n' %(e.returncode, e.output))
+ self.fail('could not regenerate netplan config')
+
if 'Run \'systemctl daemon-reload\' to reload units.' in out: self.fail('systemd units changed without reload')
# start NM so that we can verify that it does not manage anything
Unfortunately the test doesn't indicate why netplan apply failed.
Maybe something like this might give more info?
diff --git a/tests/ integration/ base.py b/tests/ integration/ base.py integration/ base.py integration/ base.py sBase(unittest. TestCase) :
'''Generate config, launch and settle NM and networkd'''
index 5042bf4..c8902ca 100644
--- a/tests/
+++ b/tests/
@@ -297,7 +297,12 @@ class IntegrationTest
# regenerate netplan config check_output( ['netplan' , 'apply'], stderr= subprocess. STDOUT, universal_ newlines= True) check_output( ['netplan' , 'apply'], stderr= subprocess. STDOUT, universal_ newlines= True) CalledProcessEr ror as e: write(' %d: %s\n' %(e.returncode, e.output))
self. fail('systemd units changed without reload')
- out = subprocess.
+ try:
+ out = subprocess.
+ except subprocess.
+ sys.stderr.
+ self.fail('could not regenerate netplan config')
+
if 'Run \'systemctl daemon-reload\' to reload units.' in out:
# start NM so that we can verify that it does not manage anything