@@ -569,6 +569,7 @@ class BuildTriggerTests: AppTestCase {
569569 $0. environment. buildTimeout = { 10 }
570570 $0. environment. buildTriggerAllowList = { [ ] }
571571 $0. environment. buildTriggerDownscaling = { 1 }
572+ $0. environment. gitlabPipelineLimit = { 300 }
572573 $0. environment. gitlabPipelineToken = { " pipeline token " }
573574 $0. environment. random = { @Sendable _ in 0 }
574575 $0. environment. siteURL = { " http://example.com " }
@@ -587,7 +588,6 @@ class BuildTriggerTests: AppTestCase {
587588 } operation: {
588589 // Ensure we respect the pipeline limit when triggering builds
589590 // setup
590- Current . gitlabPipelineLimit = { 300 }
591591 var triggerCount = 0
592592 let client = MockClient { _, res in
593593 triggerCount += 1
@@ -696,6 +696,7 @@ class BuildTriggerTests: AppTestCase {
696696 $0. environment. buildTriggerAllowList = { [ ] }
697697 $0. environment. buildTriggerDownscaling = { 1 }
698698 $0. environment. buildTriggerLatestSwiftVersionDownscaling = { 1 }
699+ $0. environment. gitlabPipelineLimit = { 300 }
699700 $0. environment. gitlabPipelineToken = { " pipeline token " }
700701 $0. environment. random = { @Sendable _ in 0 }
701702 $0. environment. siteURL = { " http://example.com " }
@@ -714,7 +715,6 @@ class BuildTriggerTests: AppTestCase {
714715 } operation: {
715716 // Ensure we respect the pipeline limit when triggering builds for multiple package ids
716717 // setup
717- Current . gitlabPipelineLimit = { 300 }
718718 let client = MockClient { _, res in
719719 triggerCount. withLockedValue { $0 += 1 }
720720 try ? res. content. encode (
@@ -748,13 +748,13 @@ class BuildTriggerTests: AppTestCase {
748748 $0. environment. builderToken = { " builder token " }
749749 $0. environment. buildTriggerAllowList = { [ ] }
750750 $0. environment. buildTriggerDownscaling = { 1 }
751+ $0. environment. gitlabPipelineLimit = { 300 }
751752 $0. environment. gitlabPipelineToken = { " pipeline token " }
752753 $0. environment. random = { @Sendable _ in 0 }
753754 $0. environment. siteURL = { " http://example.com " }
754755 } operation: {
755756 // Ensure we trim builds as part of triggering
756757 // setup
757- Current . gitlabPipelineLimit = { 300 }
758758
759759 let client = MockClient { _, _ in }
760760
@@ -789,6 +789,7 @@ class BuildTriggerTests: AppTestCase {
789789 $0. environment. buildTimeout = { 10 }
790790 $0. environment. buildTriggerAllowList = { [ ] }
791791 $0. environment. buildTriggerDownscaling = { 1 }
792+ $0. environment. gitlabPipelineLimit = { 300 }
792793 $0. environment. gitlabPipelineToken = { " pipeline token " }
793794 $0. environment. random = { @Sendable _ in 0 }
794795 $0. environment. siteURL = { " http://example.com " }
@@ -807,7 +808,6 @@ class BuildTriggerTests: AppTestCase {
807808 } operation: {
808809 // Ensure we trim builds as part of triggering
809810 // setup
810- Current . gitlabPipelineLimit = { 300 }
811811 var triggerCount = 0
812812 let client = MockClient { _, res in
813813 // let the 5th trigger succeed to ensure we don't early out on errors
@@ -918,6 +918,7 @@ class BuildTriggerTests: AppTestCase {
918918 $0. environment. buildTimeout = { 10 }
919919 $0. environment. buildTriggerAllowList = { [ ] }
920920 $0. environment. buildTriggerDownscaling = { 1 }
921+ $0. environment. gitlabPipelineLimit = { Constants . defaultGitlabPipelineLimit }
921922 $0. environment. gitlabPipelineToken = { " pipeline token " }
922923 $0. environment. random = { @Sendable _ in 0 }
923924 $0. environment. siteURL = { " http://example.com " }
@@ -997,6 +998,7 @@ class BuildTriggerTests: AppTestCase {
997998 $0. environment. buildTimeout = { 10 }
998999 $0. environment. buildTriggerAllowList = { [ ] }
9991000 $0. environment. buildTriggerDownscaling = { 0.05 } // 5% downscaling rate
1001+ $0. environment. gitlabPipelineLimit = { Constants . defaultGitlabPipelineLimit }
10001002 $0. environment. gitlabPipelineToken = { " pipeline token " }
10011003 $0. environment. siteURL = { " http://example.com " }
10021004 // Use live dependency but replace actual client with a mock so we can
@@ -1075,6 +1077,7 @@ class BuildTriggerTests: AppTestCase {
10751077 $0. environment. buildTimeout = { 10 }
10761078 $0. environment. buildTriggerAllowList = { [ . id0] }
10771079 $0. environment. buildTriggerDownscaling = { 0.05 } // 5% downscaling rate
1080+ $0. environment. gitlabPipelineLimit = { Constants . defaultGitlabPipelineLimit }
10781081 $0. environment. gitlabPipelineToken = { " pipeline token " }
10791082 $0. environment. siteURL = { " http://example.com " }
10801083 // Use live dependency but replace actual client with a mock so we can
0 commit comments