RunCommandLogs: set a UUID automatically

This commit is contained in:
Graham Christensen
2022-01-24 11:56:34 -05:00
committed by Cole Helbling
parent 89e8676d80
commit dcb0c1425c
2 changed files with 27 additions and 0 deletions

View File

@ -20,6 +20,12 @@ sub new_run_log {
});
}
subtest "A new record has a UUID" => sub {
my $runlog = new_run_log();
is(length($runlog->uuid), 36, "The UUID attribute is sufficiently UUID-like.");
like($runlog->uuid, qr/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/, "The UUID attribute is sufficiently UUID-like.");
};
subtest "Not yet started" => sub {
my $runlog = new_run_log();