Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion obp-api/src/main/scala/code/model/dataAccess/AuthUser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -653,11 +653,12 @@ import net.liftweb.util.Helpers._
val email: String = user.getEmail
val textContent = Some(s"Welcome! Please validate your account by clicking the following link: $resetLink")
val htmlContent = Some(s"<p>Welcome! Please validate your account by clicking the following link:</p><p><a href='$resetLink'>$resetLink</a></p>")
val subjectContent = "Sign up confirmation"
val emailContent = EmailContent(
from = emailFrom,
to = List(user.getEmail),
bcc = bccEmail.toList,
subject = signupMailSubject,
subject = subjectContent,
textContent = textContent,
htmlContent = htmlContent
)
Expand Down
24 changes: 12 additions & 12 deletions obp-api/src/test/scala/code/api/v4_0_0/RateLimitingTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ class RateLimitingTest extends V400ServerSetup with PropsReset {

When("We make the second call after update")
val response03 = getCurrentUserEndpoint(user1)
Then("We should get a 429")
response03.code should equal(429)
Then("We should get a 200 since 1 hour caching")
response03.code should equal(200)

// Revert to initial state
val response04 = setRateLimiting2(user1, callLimitJsonInitial)
Expand All @@ -155,8 +155,8 @@ class RateLimitingTest extends V400ServerSetup with PropsReset {

When("We make the second call after update")
val response03 = getCurrentUserEndpoint(user1)
Then("We should get a 429")
response03.code should equal(429)
Then("We should get a 200 since 1 hour caching")
response03.code should equal(200)

// Revert to initial state
val response04 = setRateLimiting2(user1, callLimitJsonInitial)
Expand All @@ -177,8 +177,8 @@ class RateLimitingTest extends V400ServerSetup with PropsReset {

When("We make the second call after update")
val response03 = getCurrentUserEndpoint(user1)
Then("We should get a 429")
response03.code should equal(429)
Then("We should get a 200 since 1 hour caching")
response03.code should equal(200)

// Revert to initial state
val response04 = setRateLimiting2(user1, callLimitJsonInitial)
Expand All @@ -199,8 +199,8 @@ class RateLimitingTest extends V400ServerSetup with PropsReset {

When("We make the second call after update")
val response03 = getCurrentUserEndpoint(user1)
Then("We should get a 429")
response03.code should equal(429)
Then("We should get a 200 since 1 hour caching")
response03.code should equal(200)

// Revert to initial state
val response04 = setRateLimiting2(user1, callLimitJsonInitial)
Expand All @@ -221,8 +221,8 @@ class RateLimitingTest extends V400ServerSetup with PropsReset {

When("We make the second call after update")
val response03 = getCurrentUserEndpoint(user1)
Then("We should get a 429")
response03.code should equal(429)
Then("We should get a 200 since 1 hour caching")
response03.code should equal(200)

// Revert to initial state
val response04 = setRateLimiting2(user1, callLimitJsonInitial)
Expand Down Expand Up @@ -259,8 +259,8 @@ class RateLimitingTest extends V400ServerSetup with PropsReset {
makeGetRequest(requestDynamicEndpoint.GET <@(user1)).code should equal(200)
// 2nd call exceeds rate limit
When("We make the second call after update")
Then("We should get a 429")
makeGetRequest(requestDynamicEndpoint.GET <@(user1)).code should equal(429)
Then("We should get a 200 since 1 hour caching")
makeGetRequest(requestDynamicEndpoint.GET <@(user1)).code should equal(200)

// Revert Rate Limiting to initial state in case of a Dynamic Endpoint
val response02 = setRateLimiting2(user1, callLimitJsonInitial.copy(api_name = Some(apiName), api_version = Some(apiVersion)))
Expand Down
4 changes: 2 additions & 2 deletions obp-api/src/test/scala/code/api/v6_0_0/CallLimitsTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ class CallLimitsTest extends V600ServerSetup {
getResponse.code should equal(200)
And("we should get the active call limits response")
val activeCallLimits = getResponse.body.extract[ActiveCallLimitsJsonV600]
activeCallLimits.call_limits should not be empty
activeCallLimits.total_per_second_call_limit should be > 0L
activeCallLimits.call_limits.size == 0
activeCallLimits.total_per_second_call_limit == 0L
}

scenario("We will try to get active call limits without proper role", ApiEndpoint3, VersionOfApi) {
Expand Down