Skip to content

Commit

Permalink
renamed variables to be be able to bind with properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ranim-n committed Apr 24, 2024
1 parent 24a18dd commit 330077f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ services:
- APPLICATION_TENANTS_0_ISSUER=${APPLICATION_TENANTS_0_ISSUER}
- APPLICATION_TENANTS_0_NAME=${APPLICATION_TENANTS_0_NAME}
- APPLICATION_TENANTS_0_DBSCHEMA=${APPLICATION_TENANTS_0_DBSCHEMA}
- LIMIT_DEFAULT=${LIMIT_DEFAULT}
- LIMIT_MAX=${LIMIT_MAX}
- APPLICATION_PAGINATION_LIMITDEFAULT=${LIMIT_DEFAULT}
- APPLICATION_PAGINATION_LIMITMAX=${LIMIT_MAX}
ports:
- "8083:8083"
depends_on:
Expand All @@ -84,8 +84,8 @@ services:
- APPLICATION_TENANTS_0_DBSCHEMA=${APPLICATION_TENANTS_0_DBSCHEMA}
- SUBSCRIPTION_ENTITY-SERVICE-URL=${SUBSCRIPTION_ENTITY_SERVICE_URL}
- SUBSCRIPTION_STELLIO_URL=${SUBSCRIPTION_STELLIO_URL}
- LIMIT_DEFAULT=${LIMIT_DEFAULT}
- LIMIT_MAX=${LIMIT_MAX}
- APPLICATION_PAGINATION_LIMITDEFAULT=${LIMIT_DEFAULT}
- APPLICATION_PAGINATION_LIMITMAX=${LIMIT_MAX}
ports:
- "8084:8084"
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions shared/src/main/resources/shared.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ application.tenants[0].dbSchema = public

application.authentication.enabled = false
# Pagination config for query resources endpoints
application.pagination.limit-default = ${LIMIT_DEFAULT}
application.pagination.limit-max = ${LIMIT_MAX}
application.pagination.limit-default = 30
application.pagination.limit-max = 100

spring.kafka.bootstrap-servers = localhost:29092
# To ensure we get all past messages when dynamically joining a new topic based on our "cim.entities.*" pattern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,16 +465,16 @@ class SubscriptionHandlerTests {
}

@Test
fun `query subscriptions should return 400 if limit is greater than the maximum authorized limit`() {
fun `query subscriptions should return 403 if limit is greater than the maximum authorized limit`() {
webClient.get()
.uri("/ngsi-ld/v1/subscriptions/?limit=200&offset=1")
.exchange()
.expectStatus().isBadRequest
.expectStatus().isForbidden
.expectBody().json(
"""
{
"type":"https://uri.etsi.org/ngsi-ld/errors/BadRequestData",
"title":"The request includes input data which does not meet the requirements of the operation",
{
"type":"https://uri.etsi.org/ngsi-ld/errors/TooManyResults",
"title":"The query associated to the operation is producing so many results that can exhaust client or server resources. It should be made more restrictive",
"detail":"You asked for 200 results, but the supported maximum limit is 100"
}
""".trimIndent()
Expand Down

0 comments on commit 330077f

Please sign in to comment.