Skip to content

Commit

Permalink
Fix FTBFS on Debian unstable (probably /tmp on tmpfs?)
Browse files Browse the repository at this point in the history
  • Loading branch information
slyon committed Jul 10, 2024
1 parent 039ea1f commit 090a5b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/netplan_dbus/test_dbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def setUp(self):
ethernets:
eth0:
dhcp4: true""")
self.addCleanup(shutil.rmtree, self.tmp)
self.addCleanup(shutil.rmtree, self.tmp, ignore_errors=True)
self.mock_netplan_cmd = MockCmd("netplan")
self._create_mock_system_bus()
self._run_netplan_dbus_on_mock_bus()
Expand Down Expand Up @@ -284,7 +284,7 @@ def test_netplan_dbus_config(self):

cid = self._new_config_object()
tmpdir = self.tmp + '/run/netplan/config-{}'.format(cid)
self.addClassCleanup(shutil.rmtree, tmpdir)
self.addClassCleanup(shutil.rmtree, tmpdir, ignore_errors=True)

# Verify the object path has been created, by calling .Config.Get() on that object
# it would throw an error if it does not exist
Expand Down Expand Up @@ -319,7 +319,7 @@ def test_netplan_dbus_no_such_command(self):
def test_netplan_dbus_config_set(self):
cid = self._new_config_object()
tmpdir = self.tmp + '/run/netplan/config-{}'.format(cid)
self.addCleanup(shutil.rmtree, tmpdir)
self.addCleanup(shutil.rmtree, tmpdir, ignore_errors=True)

# Verify .Config.Set() on the config object
# No actual YAML file will be created, as the netplan command is mocked
Expand All @@ -340,7 +340,7 @@ def test_netplan_dbus_config_set(self):
def test_netplan_dbus_config_get(self):
cid = self._new_config_object()
tmpdir = self.tmp + '/run/netplan/config-{}'.format(cid)
self.addCleanup(shutil.rmtree, tmpdir)
self.addCleanup(shutil.rmtree, tmpdir, ignore_errors=True)

# Verify .Config.Get() on the config object
self.mock_netplan_cmd.set_output("network:\n eth42:\n dhcp6: true")
Expand Down

0 comments on commit 090a5b7

Please sign in to comment.