File: 0006-Tag-tests-relying-on-remote-network.patch

package info (click to toggle)
composer 2.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,420 kB
  • sloc: php: 81,869; makefile: 59; xml: 39
file content (183 lines) | stat: -rw-r--r-- 7,370 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Fri, 11 Dec 2020 11:49:36 -0400
Subject: Tag tests relying on remote network

---
 tests/Composer/Test/Command/AuditCommandTest.php    | 2 ++
 tests/Composer/Test/Command/DiagnoseCommandTest.php | 3 +++
 tests/Composer/Test/Command/RemoveCommandTest.php   | 3 +++
 tests/Composer/Test/Command/RequireCommandTest.php  | 2 ++
 tests/Composer/Test/Command/ShowCommandTest.php     | 2 ++
 tests/Composer/Test/Command/StatusCommandTest.php   | 2 ++
 tests/Composer/Test/CompletionFunctionalTest.php    | 2 ++
 tests/Composer/Test/Util/RemoteFilesystemTest.php   | 2 ++
 8 files changed, 18 insertions(+)

diff --git a/tests/Composer/Test/Command/AuditCommandTest.php b/tests/Composer/Test/Command/AuditCommandTest.php
index 4563e0f..1c278ba 100644
--- a/tests/Composer/Test/Command/AuditCommandTest.php
+++ b/tests/Composer/Test/Command/AuditCommandTest.php
@@ -13,6 +13,7 @@
 namespace Composer\Test\Command;
 
 use Composer\Test\TestCase;
+use PHPUnit\Framework\Attributes\Group;
 use UnexpectedValueException;
 
 class AuditCommandTest extends TestCase
@@ -42,6 +43,7 @@ class AuditCommandTest extends TestCase
         $appTester->run(['command' => 'audit', '--locked' => true]);
     }
 
+    #[Group('remote')]
     public function testAuditPackageWithNoSecurityVulnerabilities(): void
     {
         $this->initTempComposer();
diff --git a/tests/Composer/Test/Command/DiagnoseCommandTest.php b/tests/Composer/Test/Command/DiagnoseCommandTest.php
index ef241c9..ae2420f 100644
--- a/tests/Composer/Test/Command/DiagnoseCommandTest.php
+++ b/tests/Composer/Test/Command/DiagnoseCommandTest.php
@@ -14,9 +14,11 @@ namespace Composer\Test\Command;
 
 use Composer\Test\TestCase;
 use Composer\Util\Platform;
+use PHPUnit\Framework\Attributes\Group;
 
 class DiagnoseCommandTest extends TestCase
 {
+    #[Group('remote')]
     public function testCmdFail(): void
     {
         $this->initTempComposer(['name' => 'foo/bar', 'description' => 'test pkg']);
@@ -39,6 +41,7 @@ Checking https connectivity to packagist: OK
 Checking github.com rate limit: ', $output);
     }
 
+    #[Group('remote')]
     public function testCmdSuccess(): void
     {
         $this->initTempComposer(['name' => 'foo/bar', 'description' => 'test pkg', 'license' => 'MIT']);
diff --git a/tests/Composer/Test/Command/RemoveCommandTest.php b/tests/Composer/Test/Command/RemoveCommandTest.php
index acaa63a..23a5207 100644
--- a/tests/Composer/Test/Command/RemoveCommandTest.php
+++ b/tests/Composer/Test/Command/RemoveCommandTest.php
@@ -17,6 +17,7 @@ use Composer\Package\Link;
 use Composer\Semver\Constraint\MatchAllConstraint;
 use Composer\Test\TestCase;
 use InvalidArgumentException;
+use PHPUnit\Framework\Attributes\Group;
 use Symfony\Component\Console\Command\Command;
 use UnexpectedValueException;
 
@@ -42,6 +43,7 @@ class RemoveCommandTest extends TestCase
         self::assertEquals(Command::FAILURE, $appTester->run(['command' => 'remove', '--unused' => true]));
     }
 
+    #[Group('remote')]
     public function testWarningWhenRemovingNonExistentPackage(): void
     {
         $this->initTempComposer();
@@ -391,6 +393,7 @@ Lock file operations: 0 installs, 0 updates, 2 removals
         self::assertEquals(['require' => ['root/req' => '1.*', 'root/another' => '1.*', 'another/req' => '1.*']], (new JsonFile('./composer.json'))->read());
     }
 
+    #[Group('remote')]
     public function testPackageStillPresentErrorWhenNoInstallFlagUsed(): void
     {
         $this->initTempComposer([
diff --git a/tests/Composer/Test/Command/RequireCommandTest.php b/tests/Composer/Test/Command/RequireCommandTest.php
index 8165d70..a24db42 100644
--- a/tests/Composer/Test/Command/RequireCommandTest.php
+++ b/tests/Composer/Test/Command/RequireCommandTest.php
@@ -15,9 +15,11 @@ namespace Composer\Test\Command;
 use Composer\Json\JsonFile;
 use Composer\Test\TestCase;
 use InvalidArgumentException;
+use PHPUnit\Framework\Attributes\Group;
 
 class RequireCommandTest extends TestCase
 {
+    #[Group('remote')]
     public function testRequireThrowsIfNoneMatches(): void
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/tests/Composer/Test/Command/ShowCommandTest.php b/tests/Composer/Test/Command/ShowCommandTest.php
index 432fc4c..a22705a 100644
--- a/tests/Composer/Test/Command/ShowCommandTest.php
+++ b/tests/Composer/Test/Command/ShowCommandTest.php
@@ -19,6 +19,7 @@ use Composer\Repository\PlatformRepository;
 use Composer\Test\TestCase;
 use DateTimeImmutable;
 use InvalidArgumentException;
+use PHPUnit\Framework\Attributes\Group;
 
 class ShowCommandTest extends TestCase
 {
@@ -736,6 +737,7 @@ OUTPUT;
      * @dataProvider provideNotExistingPackage
      * @param array<string, mixed> $options
      */
+    #[Group('remote')]
     public function testNotExistingPackage(string $package, array $options, string $expected): void
     {
         $dir = $this->initTempComposer([
diff --git a/tests/Composer/Test/Command/StatusCommandTest.php b/tests/Composer/Test/Command/StatusCommandTest.php
index 9b7e17f..baf43ce 100644
--- a/tests/Composer/Test/Command/StatusCommandTest.php
+++ b/tests/Composer/Test/Command/StatusCommandTest.php
@@ -14,6 +14,7 @@ namespace Composer\Test\Command;
 
 use Composer\Test\TestCase;
 use Generator;
+use PHPUnit\Framework\Attributes\Group;
 
 class StatusCommandTest extends TestCase
 {
@@ -39,6 +40,7 @@ class StatusCommandTest extends TestCase
      * @param array<mixed> $commandFlags
      * @param array<mixed> $packageData
      */
+    #[Group('remote')]
     public function testLocallyModifiedPackages(
         array $composerJson,
         array $commandFlags,
diff --git a/tests/Composer/Test/CompletionFunctionalTest.php b/tests/Composer/Test/CompletionFunctionalTest.php
index 1a691af..a6dd619 100644
--- a/tests/Composer/Test/CompletionFunctionalTest.php
+++ b/tests/Composer/Test/CompletionFunctionalTest.php
@@ -13,6 +13,7 @@
 namespace Composer\Test;
 
 use Composer\Console\Application;
+use PHPUnit\Framework\Attributes\Group;
 use Symfony\Component\Console\Tester\CommandCompletionTester;
 
 /**
@@ -126,6 +127,7 @@ class CompletionFunctionalTest extends TestCase
      * @param string $input The command that is typed
      * @param string[]|null $expectedSuggestions Sample expected suggestions. Null if nothing is expected.
      */
+    #[Group('remote')]
     public function testComplete(string $input, ?array $expectedSuggestions): void
     {
         $input = explode(' ', $input);
diff --git a/tests/Composer/Test/Util/RemoteFilesystemTest.php b/tests/Composer/Test/Util/RemoteFilesystemTest.php
index 965b24f..b8705da 100644
--- a/tests/Composer/Test/Util/RemoteFilesystemTest.php
+++ b/tests/Composer/Test/Util/RemoteFilesystemTest.php
@@ -17,6 +17,7 @@ use Composer\IO\IOInterface;
 use Composer\Util\AuthHelper;
 use Composer\Util\RemoteFilesystem;
 use Composer\Test\TestCase;
+use PHPUnit\Framework\Attributes\Group;
 use PHPUnit\Framework\MockObject\MockObject;
 use ReflectionMethod;
 use ReflectionProperty;
@@ -280,6 +281,7 @@ class RemoteFilesystemTest extends TestCase
      * @param non-empty-string $url
      * @requires PHP 7.4.17
      */
+    #[Group('remote')]
     public function testBitBucketPublicDownload(string $url, string $contents): void
     {
         $io = $this