Skip to content

Commit

Permalink
Restrict build GraphQL test to only the projects it creates (#2670)
Browse files Browse the repository at this point in the history
#2664 allowed CTest to have more flexibility regarding the ordering of
tests. That exposed an issue with the `BuildTypeTest` which relied upon
more than just data it created. This PR resolves the issue by
restricting the test to use only the data it creates.
  • Loading branch information
williamjallen authored Jan 17, 2025
1 parent c54e150 commit 4903cea
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/Feature/GraphQL/BuildTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,12 @@ public function testBasicBuildFiltering(): void
}

$this->graphQL('
query($buildname: String) {
projects {
query($projectid: ID, $buildname: String) {
projects(filters: {
eq: {
id: $projectid
}
}) {
edges {
node {
name
Expand All @@ -491,6 +495,7 @@ public function testBasicBuildFiltering(): void
}
}
', [
'projectid' => $this->project->id,
'buildname' => $builds[2]->name,
])->assertJson([
'data' => [
Expand Down

0 comments on commit 4903cea

Please sign in to comment.