-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that index.html works in any directory in native mode
(cherry picked from commit 24b3fa7)
- Loading branch information
Showing
7 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
integration-tests/vertx-http/src/main/resources/META-INF/resources/dummy/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<html> | ||
<head> | ||
<title>Hello world</title></head> | ||
<body> | ||
Hello World | ||
</body> | ||
</html> |
Empty file.
7 changes: 7 additions & 0 deletions
7
integration-tests/vertx-http/src/main/resources/META-INF/resources/l1/l2/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<html> | ||
<head> | ||
<title>Hello world</title></head> | ||
<body> | ||
Hello World | ||
</body> | ||
</html> |
1 change: 1 addition & 0 deletions
1
integration-tests/vertx-http/src/main/resources/META-INF/resources/test.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test |
7 changes: 7 additions & 0 deletions
7
integration-tests/vertx-http/src/test/java/io/quarkus/it/vertx/StaticResourcesIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.quarkus.it.vertx; | ||
|
||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
|
||
@QuarkusIntegrationTest | ||
public class StaticResourcesIT extends StaticResourcesTest { | ||
} |
41 changes: 41 additions & 0 deletions
41
integration-tests/vertx-http/src/test/java/io/quarkus/it/vertx/StaticResourcesTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package io.quarkus.it.vertx; | ||
|
||
import static io.restassured.RestAssured.when; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import io.quarkus.test.junit.QuarkusTest; | ||
|
||
@QuarkusTest | ||
public class StaticResourcesTest { | ||
|
||
@Test | ||
public void testExisting() { | ||
when().get("/test.txt").then().statusCode(200); | ||
} | ||
|
||
@Test | ||
public void testNonExisting() { | ||
when().get("/test2.txt").then().statusCode(404); | ||
} | ||
|
||
@Test | ||
public void testIndexInDirectory() { | ||
when().get("/dummy/").then().statusCode(200); | ||
} | ||
|
||
@Test | ||
public void testIndexInNestedDirectory() { | ||
when().get("/l1/l2/").then().statusCode(200); | ||
} | ||
|
||
@Test | ||
public void testNonIndexInDirectory() { | ||
when().get("/dummy2/").then().statusCode(404); | ||
} | ||
|
||
@Test | ||
public void testIndexInNonExistingDirectory() { | ||
when().get("/dummy3/").then().statusCode(404); | ||
} | ||
} |