Skip to content

Commit dada3a6

Browse files
authored
Merge pull request #651 from xcp-ng/srt/empty_network
changes on empty_network fixture
2 parents ce2c156 + ab14a9e commit dada3a6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/network/conftest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,17 @@ def vm_with_tcpdump_scope_function(vm_with_tcpdump_scope_module: VM):
5050
yield vm
5151
vm.destroy()
5252

53-
@pytest.fixture(scope='module')
53+
@pytest.fixture(scope='function')
5454
def empty_network(host: Host) -> Generator[Network, None, None]:
5555
net = host.create_network(label="empty_network for tests")
56+
5657
yield net
58+
59+
for vif_uuid in net.vif_uuids():
60+
host.xe("vif-unplug", {
61+
'uuid': vif_uuid,
62+
})
63+
5764
net.destroy()
5865

5966
@pytest.fixture(scope='function')

0 commit comments

Comments
 (0)