Skip to content

Commit

Permalink
Fix up tests
Browse files Browse the repository at this point in the history
Following a SourceArchiveCreator::create-archive interface change.
  • Loading branch information
patrickbkr committed Oct 30, 2023
1 parent 980540c commit d7910cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions t/CITestSetManager.rakutest
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ class TestCITestStatusListener does CITestStatusListener {
my $dummy-id = "some dummy id";

class TestSourceArchiveCreator {
method create-archive(SourceSpec $source-spec --> Str) {
return $dummy-id;
method create-archive(DB::CITestSet $test-set) {
$test-set.source-archive-exists = True;
$test-set.source-archive-id = $dummy-id;
$test-set.^save;
}
}

Expand Down
8 changes: 7 additions & 1 deletion t/Integration.rakutest
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,14 @@ my $obs-interface = mocked(OBSInterface,
);

my $source-archive-creator = mocked(SourceArchiveCreator,
overriding => {
create-archive => -> $test-set {
$test-set.source-archive-exists = True;
$test-set.source-archive-id = $dummy-src-id;
$test-set.^save;
},
},
returning => {
create-archive => $dummy-src-id,
get-archive-path => $dummy-src-path,
}
);
Expand Down

0 comments on commit d7910cb

Please sign in to comment.