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

Legge på at behovssvar krever '@final=true' for å spille sammen med d… #140

Merged
merged 2 commits into from
Apr 17, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal object PostgresDataSourceBuilder {
const val DB_HOST_KEY = "DB_HOST"
const val DB_PORT_KEY = "DB_PORT"

private fun getOrThrow(key: String): String = OptionHelper.getEnv(key) ?: OptionHelper.getSystemProperty(key)
private fun getOrThrow(key: String): String = OptionHelper.getEnv(key) ?: OptionHelper.getSystemProperty(key) ?: throw IllegalArgumentException("Missing required environment variable $key")

val dataSource by lazy {
HikariDataSource().apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ internal class EksisterendeSakerMottak(
init {
River(rapidsConnection).apply {
validate { it.requireValue("@event_name", "behov") }
validate { it.requireValue("@final", true) }
validate { it.require("@opprettet", JsonNode::asLocalDateTime) }
validate { it.requireKey(løsning) }
validate { it.requireKey("journalpostId") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ internal class GosysOppgaveOpprettetMottak(
init {
River(rapidsConnection).apply {
validate { it.requireValue("@event_name", "behov") }
validate { it.requireValue("@final", true) }
validate { it.require("@opprettet", JsonNode::asLocalDateTime) }
validate { it.requireKey(løsning) }
validate { it.requireKey("journalpostId") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ internal class JournalpostFerdigstiltMottak(
init {
River(rapidsConnection).apply {
validate { it.requireValue("@event_name", "behov") }
validate { it.requireValue("@final", true) }
validate { it.require("@opprettet", JsonNode::asLocalDateTime) }
validate { it.requireKey(løsning) }
validate { it.requireKey("journalpostId") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ internal class JournalpostMottak(
init {
River(rapidsConnection).apply {
validate { it.requireValue("@event_name", "behov") }
validate { it.requireValue("@final", true) }
validate { it.require("@opprettet", JsonNode::asLocalDateTime) }
validate { it.requireKey(løsning) }
validate { it.requireKey("journalpostId") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ internal class JournalpostOppdatertMottak(
init {
River(rapidsConnection).apply {
validate { it.requireValue("@event_name", "behov") }
validate { it.requireValue("@final", true) }
validate { it.require("@opprettet", JsonNode::asLocalDateTime) }
validate { it.requireKey(løsning) }
validate { it.requireKey("journalpostId") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ internal class MinsteinntektVurderingMottak(
init {
River(rapidsConnection).apply {
validate { it.requireValue("@event_name", "behov") }
validate { it.requireValue("@final", true) }
validate { it.require("@opprettet", JsonNode::asLocalDateTime) }
validate { it.requireKey(løsning) }
validate { it.requireKey("journalpostId") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ internal class OpprettArenaOppgaveMottak(
init {
River(rapidsConnection).apply {
validate { it.requireValue("@event_name", "behov") }
validate { it.requireValue("@final", true) }
validate { it.require("@opprettet", JsonNode::asLocalDateTime) }
validate {
it.demandAllOrAny(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ internal class PersondataMottak(
init {
River(rapidsConnection).apply {
validate { it.requireValue("@event_name", "behov") }
validate { it.requireValue("@final", true) }
validate { it.require("@opprettet", JsonNode::asLocalDateTime) }
validate { it.require(key = løsning, parser = {}) }
validate { it.requireKey("journalpostId") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ internal class SøknadsdataMottak(
init {
River(rapidsConnection).apply {
validate { it.requireValue("@event_name", "behov") }
validate { it.requireValue("@final", true) }
validate { it.require("@opprettet", JsonNode::asLocalDateTime) }
validate { it.requireKey(løsning) }
validate { it.requireKey("journalpostId") }
Expand Down
Loading
Loading