Skip to content

Commit

Permalink
[tests] Check deletion of missing snapshot throws
Browse files Browse the repository at this point in the history
  • Loading branch information
ricab committed Dec 22, 2023
1 parent c6387c9 commit c2a7ede
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_base_virtual_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,14 @@ TEST_F(BaseVM, snapshotDeletionUpdatesParents)
vm.delete_snapshot(snapshot_album[1]->get_name());
}

TEST_F(BaseVM, snapshotDeletionThrowsOnMissingSnapshot)
{
const auto name = "missing";
MP_EXPECT_THROW_THAT(vm.delete_snapshot(name),
mp::NoSuchSnapshotException,
mpt::match_what(AllOf(HasSubstr(vm.vm_name), HasSubstr(name))));
}

TEST_F(BaseVM, providesChildrenNames)
{
mock_named_snapshotting();
Expand Down

0 comments on commit c2a7ede

Please sign in to comment.