Skip to content
Snippets Groups Projects
Commit 40486fd7 authored by Martin Lowe's avatar Martin Lowe :no_entry:
Browse files

Update root-path to expose non-app endpoints for health check

parent beb1c216
No related branches found
Tags v0.0.227
1 merge request!26Update HTTP root-path to expose non-app endpoints for health checks
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id> <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>2.6.3.Final</quarkus.platform.version> <quarkus.platform.version>2.11.2.Final</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version> <surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
<auto-value.version>1.8.2</auto-value.version> <auto-value.version>1.8.2</auto-value.version>
<hibernate.version>5.5.6.Final</hibernate.version> <hibernate.version>5.5.6.Final</hibernate.version>
<eclipse-api-version>0.6.5</eclipse-api-version> <eclipse-api-version>0.6.10</eclipse-api-version>
<fdndb-api-version>1.0-SNAPSHOT</fdndb-api-version> <fdndb-api-version>1.0-SNAPSHOT</fdndb-api-version>
</properties> </properties>
<repositories> <repositories>
......
...@@ -34,7 +34,7 @@ import org.eclipsefoundation.wg.services.WorkingGroupsService; ...@@ -34,7 +34,7 @@ import org.eclipsefoundation.wg.services.WorkingGroupsService;
* *
* @author Martin Lowe, Zachary Sabourin * @author Martin Lowe, Zachary Sabourin
*/ */
@Path("working-groups") @Path("")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
public class WorkingGroupsResource { public class WorkingGroupsResource {
......
quarkus.http.root-path=/working-groups
fdndb-api/mp-rest/url=http://localhost:8095 fdndb-api/mp-rest/url=http://localhost:8095
fdndb-api/mp-rest/scope=javax.inject.Singleton fdndb-api/mp-rest/scope=javax.inject.Singleton
......
...@@ -23,7 +23,7 @@ import io.restassured.http.ContentType; ...@@ -23,7 +23,7 @@ import io.restassured.http.ContentType;
@QuarkusTest @QuarkusTest
class WorkingGroupsResourceTest { class WorkingGroupsResourceTest {
public final static String WGS_BASE_URL = "/working-groups"; public final static String WGS_BASE_URL = "";
public final static String WG_STATUS_URL = WGS_BASE_URL + "?status={param}"; public final static String WG_STATUS_URL = WGS_BASE_URL + "?status={param}";
public final static String WG_STATUSES_URL = WGS_BASE_URL + "?status={param1}&status={param2}"; public final static String WG_STATUSES_URL = WGS_BASE_URL + "?status={param1}&status={param2}";
...@@ -37,65 +37,71 @@ class WorkingGroupsResourceTest { ...@@ -37,65 +37,71 @@ class WorkingGroupsResourceTest {
/* /*
* GET_ALL * GET_ALL
*/ */
public final static EndpointTestCase GET_ALL_SUCCESS = TestCaseHelper.buildSuccessCase(WGS_BASE_URL, public final static EndpointTestCase GET_ALL_SUCCESS = TestCaseHelper
new String[] {}, SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH); .buildSuccessCase(WGS_BASE_URL, new String[] {}, SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH);
public final static EndpointTestCase GET_ALL_INVALID_FORMAT = TestCaseHelper.buildInvalidFormatCase(WGS_BASE_URL, public final static EndpointTestCase GET_ALL_INVALID_FORMAT = TestCaseHelper
new String[] {}, ContentType.TEXT); .buildInvalidFormatCase(WGS_BASE_URL, new String[] {}, ContentType.TEXT);
public final static EndpointTestCase GET_ALL_SINGLE_STATUS_SUCCESS = TestCaseHelper.buildSuccessCase(WG_STATUS_URL, public final static EndpointTestCase GET_ALL_SINGLE_STATUS_SUCCESS = TestCaseHelper
new String[] { "active" }, SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH); .buildSuccessCase(WG_STATUS_URL, new String[] { "active" },
SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH);
public final static EndpointTestCase GET_ALL_MULTI_STATUS_SUCCESS = TestCaseHelper.buildSuccessCase(WG_STATUSES_URL, public final static EndpointTestCase GET_ALL_MULTI_STATUS_SUCCESS = TestCaseHelper
new String[] { "active", "archived" }, SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH); .buildSuccessCase(WG_STATUSES_URL, new String[] { "active", "archived" },
SchemaNamespaceHelper.WORKING_GROUPS_SCHEMA_PATH);
/* /*
* GET_BY_ALIAS * GET_BY_ALIAS
*/ */
public final static EndpointTestCase GET_BY_ALIAS_SUCCESS = TestCaseHelper.buildSuccessCase(WG_BASE_URL, public final static EndpointTestCase GET_BY_ALIAS_SUCCESS = TestCaseHelper
new String[] { "awful-group" }, SchemaNamespaceHelper.WORKING_GROUP_SCHEMA_PATH); .buildSuccessCase(WG_BASE_URL, new String[] { "awful-group" },
SchemaNamespaceHelper.WORKING_GROUP_SCHEMA_PATH);
public final static EndpointTestCase GET_BY_ALIAS_INVALID_ALIAS = TestCaseHelper.buildNotFoundCase(WG_BASE_URL, public final static EndpointTestCase GET_BY_ALIAS_INVALID_ALIAS = TestCaseHelper
new String[] { "invalid-Group" }); .buildNotFoundCase(WG_BASE_URL, new String[] { "invalid-Group" }, null);
public final static EndpointTestCase GET_BY_ALIAS_INVALID_FORMAT = TestCaseHelper.buildInvalidFormatCase( public final static EndpointTestCase GET_BY_ALIAS_INVALID_FORMAT = TestCaseHelper
WG_BASE_URL, new String[] { "important-group" }, ContentType.TEXT); .buildInvalidFormatCase(WG_BASE_URL, new String[] { "important-group" }, ContentType.TEXT);
/* /*
* GET_RESOURCES * GET_RESOURCES
*/ */
public final static EndpointTestCase GET_RESOURCES_SUCCESS = TestCaseHelper.buildSuccessCase(WG_RESOURCES_URL, public final static EndpointTestCase GET_RESOURCES_SUCCESS = TestCaseHelper
new String[] { "important-group" }, SchemaNamespaceHelper.WORKING_GROUP_RESOURCES_SCHEMA_PATH); .buildSuccessCase(WG_RESOURCES_URL, new String[] { "important-group" },
SchemaNamespaceHelper.WORKING_GROUP_RESOURCES_SCHEMA_PATH);
public final static EndpointTestCase GET_RESOURCES_INVALID_ALIAS = TestCaseHelper.buildNotFoundCase( public final static EndpointTestCase GET_RESOURCES_INVALID_ALIAS = TestCaseHelper
WG_RESOURCES_URL, new String[] { "invalid-Group" }); .buildNotFoundCase(WG_RESOURCES_URL, new String[] { "invalid-Group" }, null);
public final static EndpointTestCase GET_RESOURCES_INVALID_FORMAT = TestCaseHelper.buildInvalidFormatCase( public final static EndpointTestCase GET_RESOURCES_INVALID_FORMAT = TestCaseHelper
WG_RESOURCES_URL, new String[] { "mediocre-group " }, ContentType.TEXT); .buildInvalidFormatCase(WG_RESOURCES_URL, new String[] { "mediocre-group " }, ContentType.TEXT);
/* /*
* GET_LEVELS * GET_LEVELS
*/ */
public final static EndpointTestCase GET_LEVELS_SUCCESS = TestCaseHelper.buildSuccessCase(WG_LEVELS_URL, public final static EndpointTestCase GET_LEVELS_SUCCESS = TestCaseHelper
new String[] { "mediocre-group" }, SchemaNamespaceHelper.WORKING_GROUP_LEVELS_SCHEMA_PATH); .buildSuccessCase(WG_LEVELS_URL, new String[] { "mediocre-group" },
SchemaNamespaceHelper.WORKING_GROUP_LEVELS_SCHEMA_PATH);
public final static EndpointTestCase GET_LEVELS_INVALID_ALIAS = TestCaseHelper.buildNotFoundCase(WG_LEVELS_URL, public final static EndpointTestCase GET_LEVELS_INVALID_ALIAS = TestCaseHelper
new String[] { "invalid-Group" }); .buildNotFoundCase(WG_LEVELS_URL, new String[] { "invalid-Group" }, null);
public final static EndpointTestCase GET_LEVELS_INVALID_FORMAT = TestCaseHelper.buildInvalidFormatCase( public final static EndpointTestCase GET_LEVELS_INVALID_FORMAT = TestCaseHelper
WG_LEVELS_URL, new String[] { "mediocre-group " }, ContentType.TEXT); .buildInvalidFormatCase(WG_LEVELS_URL, new String[] { "mediocre-group " }, ContentType.TEXT);
/* /*
* GET_AGREEMENTS * GET_AGREEMENTS
*/ */
public final static EndpointTestCase GET_AGREEMENTS_SUCCESS = TestCaseHelper.buildSuccessCase(WG_AGREEMENTS_URL, public final static EndpointTestCase GET_AGREEMENTS_SUCCESS = TestCaseHelper
new String[] { "important-group" }, SchemaNamespaceHelper.WORKING_GROUP_AGREEMENT_SCHEMA_PATH); .buildSuccessCase(WG_AGREEMENTS_URL, new String[] { "important-group" },
SchemaNamespaceHelper.WORKING_GROUP_AGREEMENT_SCHEMA_PATH);
public final static EndpointTestCase GET_AGREEMENTS_INVALID_ALIAS = TestCaseHelper.buildNotFoundCase( public final static EndpointTestCase GET_AGREEMENTS_INVALID_ALIAS = TestCaseHelper
WG_AGREEMENTS_URL, new String[] { "invalid-Group" }); .buildNotFoundCase(WG_AGREEMENTS_URL, new String[] { "invalid-Group" }, null);
public final static EndpointTestCase GET_AGREEMENTS_INVALID_FORMAT = TestCaseHelper.buildInvalidFormatCase( public final static EndpointTestCase GET_AGREEMENTS_INVALID_FORMAT = TestCaseHelper
WG_AGREEMENTS_URL, new String[] { "important-group" }, ContentType.TEXT); .buildInvalidFormatCase(WG_AGREEMENTS_URL, new String[] { "important-group" }, ContentType.TEXT);
@Test @Test
void getAll_success() { void getAll_success() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment