Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESWE-1181] Employer Creation; JB API client, retriever #15

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

rickchoijd
Copy link
Contributor

  • implemented JobsBoardApiClient, with unit tests and integration tests
  • implemented EmployerRetriever, with integration tests

- implemented `JobsBoardApiClient`, with unit tests and integration tests
- implemented `EmployerRetriever`, with integration tests
@rickchoijd rickchoijd requested a review from gbmojo January 21, 2025 15:01
@@ -0,0 +1,43 @@
package uk.gov.justice.digital.hmpps.jobsboardintegrationapi.employers.domain

object EmployerMother {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied from jobs-board backend

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming and idea was taken from this pattern: https://martinfowler.com/bliki/ObjectMother.html
Thanks for asking @gbmojo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename it later

Comment on lines +1 to +13
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%kvp- %msg%n</pattern>
</encoder>
</appender>

<logger name="uk.gov.justice.digital.hmpps.jobsboardintegrationapi" level="DEBUG"/>

<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
</configuration>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logging config for unit test without Spring Test

Comment on lines +37 to +42
hmpps-jobs-board-api:
provider: hmpps-auth
client-id: ${api.client.id}
client-secret: ${api.client.secret}
authorization-grant-type: client_credentials
scope: read
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Client credentials will be required to consume internal API (1 per env)
We better revise endpoint-based roles at our backend.

@rickchoijd rickchoijd merged commit 8c48e06 into main Jan 21, 2025
6 checks passed
@rickchoijd rickchoijd deleted the ESWE-1181-publish-employers-events branch January 21, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants