File tree Expand file tree Collapse file tree 3 files changed +18
-22
lines changed
src/test/java/app/fyreplace/api/testing Expand file tree Collapse file tree 3 files changed +18
-22
lines changed Original file line number Diff line number Diff line change 11org.gradle.jvmargs =-Xmx1024M
2- quarkusPlatformVersion =3.19.3
3- quarkusPluginVersion =3.19.3
2+ quarkusPlatformVersion =3.21.0
3+ quarkusPluginVersion =3.21.0
44quarkusLoggingSentry =2.1.2
55quarkusOtelExporter =3.18.3.1
6- sentryVersion =8.4 .0
7- javaXtVersion =2.1.9
6+ sentryVersion =8.5 .0
7+ javaXtVersion =2.1.10
88twelveMonkeysVersion =3.12.0
99spotlessPluginVersion =7.0.2
10- lombokPluginVersion =8.13
10+ lombokPluginVersion =8.13.1
Original file line number Diff line number Diff line change @@ -20,22 +20,22 @@ public abstract class TransactionalTestsBase {
2020 public DataSeeder dataSeeder ;
2121
2222 @ Inject
23- MockMailbox mailbox ;
23+ public MockMailbox mailbox ;
2424
2525 @ TestHTTPResource ("image.jpeg" )
26- URL jpeg ;
26+ public URL jpegResource ;
2727
2828 @ TestHTTPResource ("image.png" )
29- URL png ;
29+ public URL pngResource ;
3030
3131 @ TestHTTPResource ("image.webp" )
32- URL webp ;
32+ public URL webpResource ;
3333
3434 @ TestHTTPResource ("image.gif" )
35- URL gif ;
35+ public URL gifResource ;
3636
3737 @ TestHTTPResource ("image.txt" )
38- URL text ;
38+ public URL testResource ;
3939
4040 protected static final String FAKE_ID = "00000000-0000-0000-0000-000000000000" ;
4141
@@ -54,11 +54,11 @@ protected List<Mail> getMailsSentTo(final Email email) {
5454
5555 protected InputStream openStream (final String fileType ) throws IOException {
5656 return (switch (fileType ) {
57- case "jpeg" -> jpeg ;
58- case "png" -> png ;
59- case "webp" -> webp ;
60- case "gif" -> gif ;
61- case "text" -> text ;
57+ case "jpeg" -> jpegResource ;
58+ case "png" -> pngResource ;
59+ case "webp" -> webpResource ;
60+ case "gif" -> gifResource ;
61+ case "text" -> testResource ;
6262 default -> throw new IllegalArgumentException ("Unknown file type: " + fileType );
6363 })
6464 .openStream ();
Original file line number Diff line number Diff line change 77import app .fyreplace .api .endpoints .UsersEndpoint ;
88import app .fyreplace .api .testing .UserTestsBase ;
99import io .quarkus .test .common .http .TestHTTPEndpoint ;
10- import io .quarkus .test .common .http .TestHTTPResource ;
1110import io .quarkus .test .junit .QuarkusTest ;
1211import io .quarkus .test .security .TestSecurity ;
1312import io .restassured .http .ContentType ;
1413import java .io .IOException ;
15- import java . net . URL ;
14+
1615import org .junit .jupiter .api .Test ;
1716
1817@ QuarkusTest
1918@ TestHTTPEndpoint (UsersEndpoint .class )
2019public final class DeleteCurrentUserAvatarTests extends UserTestsBase {
21- @ TestHTTPResource ("image.jpeg" )
22- URL jpeg ;
23-
2420 @ Test
2521 @ TestSecurity (user = "user_0" )
2622 public void deleteCurrentUserAvatar () throws IOException {
27- try (final var stream = jpeg .openStream ()) {
23+ try (final var stream = jpegResource .openStream ()) {
2824 given ().contentType (ContentType .BINARY )
2925 .body (stream .readAllBytes ())
3026 .put ("current/avatar" )
You can’t perform that action at this time.
0 commit comments