File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 Exception \ClientException ,
2323 Exception \GuzzleException ,
2424 Exception \RequestException ,
25+ Exception \ServerException ,
2526 Handler \MockHandler ,
2627 HandlerStack ,
2728 Middleware ,
2829 Psr7 \Request ,
29- Psr7 \Response
30- };
30+ Psr7 \Response };
3131use ParagonIE \Certainty \{
3232 Exception \CertaintyException ,
3333 RemoteFetch
@@ -53,7 +53,11 @@ class WebFingerTest extends TestCase
5353
5454 public function tearDown (): void
5555 {
56- new WebFinger ($ this ->getConfig ())->clearCaches ();
56+ try {
57+ new WebFinger ($ this ->getConfig ())->clearCaches ();
58+ } catch (ServerException $ ex ) {
59+ $ this ->markTestSkipped ($ ex ->getMessage ());
60+ }
5761 }
5862
5963 public function testConstructorDefaults (): void
Original file line number Diff line number Diff line change 6969 CoversClass ,
7070 UsesClass
7171};
72+ use GuzzleHttp \Exception \ServerException ;
7273use JsonException as BaseJsonException ;
7374use GuzzleHttp \Exception \GuzzleException ;
7475use ParagonIE \ConstantTime \Base64UrlSafe ;
@@ -187,7 +188,11 @@ public function testOtherActionsWithPeerRewrapping(): void
187188 $ this ->clearOldTransaction ($ config );
188189 $ protocol = new Protocol ($ config );
189190
190- $ wf = new WebFinger ($ config );
191+ try {
192+ $ wf = new WebFinger ($ config );
193+ } catch (ServerException $ ex ) {
194+ $ this ->markTestSkipped ($ ex ->getMessage ());
195+ }
191196 $ wf ->setCanonicalForTesting ($ canonical , $ canonical );
192197 $ wf ->setCanonicalForTesting ($ canonical2 , $ canonical2 );
193198
Original file line number Diff line number Diff line change 2727 Handler
2828};
2929use GuzzleHttp \Exception \GuzzleException ;
30+ use GuzzleHttp \Exception \ServerException ;
3031use ParagonIE \Certainty \Exception \CertaintyException ;
3132use ParagonIE \HPKE \KEM \PQKEM \EncapsKey ;
3233use ParagonIE \PQCrypto \Exception \MLDSAInternalException ;
@@ -370,7 +371,12 @@ public function testMoveIdentity(): void
370371 $ this ->addTestPeer ();
371372 [$ oldActor , $ canonical ] = $ this ->makeDummyActor ();
372373 [$ newActor , $ canonical2 ] = $ this ->makeDummyActor ();
373- $ wf = new WebFinger ($ this ->config );
374+ try {
375+ $ wf = new WebFinger ($ this ->config );
376+ } catch (ServerException $ ex ) {
377+ // Network issue, not a code issue:
378+ $ this ->markTestSkipped ($ ex ->getMessage ());
379+ }
374380 $ wf ->setCanonicalForTesting ($ oldActor , $ canonical );
375381 $ wf ->setCanonicalForTesting ($ newActor , $ canonical2 );
376382 $ wf ->setCanonicalForTesting ($ canonical , $ canonical );
Original file line number Diff line number Diff line change 2323 Handler ,
2424 ProtocolMessageInterface
2525};
26+ use GuzzleHttp \Exception \ServerException ;
2627use FediE2EE \PKD \Crypto \{Merkle \InclusionProof , SecretKey , SymmetricKey };
2728use GuzzleHttp \Psr7 \Response ;
2829use FediE2EE \PKDServer \Protocol \{
@@ -168,7 +169,11 @@ public function beforeTests(): void
168169 [$ canonical , $ sk ] = $ this ->makeAndStoreDummyActor ();
169170
170171 // Next, let's kick off replication:
171- $ witness = new Witness ($ this ->config );
172+ try {
173+ $ witness = new Witness ($ this ->config );
174+ } catch (ServerException $ ex ) {
175+ $ this ->markTestSkipped ($ ex ->getMessage ());
176+ }
172177 $ witness ->run ();
173178
174179 // Now let's store the dummy info:
You can’t perform that action at this time.
0 commit comments