From 4903cea533da4cf7c4f10eebea37850551cd0418 Mon Sep 17 00:00:00 2001 From: William Allen <16820599+williamjallen@users.noreply.github.com> Date: Fri, 17 Jan 2025 12:59:52 -0500 Subject: [PATCH] Restrict build GraphQL test to only the projects it creates (#2670) #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. --- tests/Feature/GraphQL/BuildTypeTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/Feature/GraphQL/BuildTypeTest.php b/tests/Feature/GraphQL/BuildTypeTest.php index f84f57f3b..6d0d97b2d 100644 --- a/tests/Feature/GraphQL/BuildTypeTest.php +++ b/tests/Feature/GraphQL/BuildTypeTest.php @@ -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 @@ -491,6 +495,7 @@ public function testBasicBuildFiltering(): void } } ', [ + 'projectid' => $this->project->id, 'buildname' => $builds[2]->name, ])->assertJson([ 'data' => [