Skip to content
Draft
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
4 changes: 2 additions & 2 deletions backend/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Kotlin dependent packages have already been installed for you.

Run tests like this (if you have Docker set up properly):
First check whether Docker is present (e.g. `docker info`). If it is, prefer running tests through Docker:

./gradlew test --console=plain

If that doesn't work due to Docker issues because you're running inside a cloud environment, try this:
Only fall back to the non-Docker route if Docker is not present or the Docker-based run fails (e.g. when running inside a cloud environment):

USE_NONDOCKER_INFRA=true ./gradlew test --console=plain

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class UseNewerProcessingPipelineVersionTask(private val submissionDatabaseServic

newVersions.forEach { (organism, latestVersion) ->
if (latestVersion != null) {
submissionDatabaseService.cleanUpOutdatedPreprocessingData(organism, latestVersion - 1)
submissionDatabaseService.cleanUpOutdatedPreprocessingData(organism, latestVersion)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ class UseNewerProcessingPipelineVersionTaskTest(
useNewerProcessingPipelineVersionTask.task()

transaction {
// check that nothing got deleted yet
assertThat(getExistingPipelineVersions(DEFAULT_ORGANISM), `is`(listOf(1L, 2L)))
// check that v1 for DEFAULT_ORGANISM is deleted (only the latest version is kept),
// but OTHER_ORGANISM is untouched
assertThat(getExistingPipelineVersions(DEFAULT_ORGANISM), `is`(listOf(2L)))
assertThat(getExistingPipelineVersions(OTHER_ORGANISM), `is`(listOf(1L)))
}

Expand All @@ -166,8 +167,8 @@ class UseNewerProcessingPipelineVersionTaskTest(
assertThat(submissionDatabaseService.getCurrentProcessingPipelineVersion(Organism(DEFAULT_ORGANISM)), `is`(3L))

transaction {
// check that v1 for DEFAULT_ORGANISM is deleted, but not for OTHER_ORGANISM
assertThat(getExistingPipelineVersions(DEFAULT_ORGANISM), `is`(listOf(2L, 3L)))
// check that only the latest version (v3) for DEFAULT_ORGANISM remains, but not for OTHER_ORGANISM
assertThat(getExistingPipelineVersions(DEFAULT_ORGANISM), `is`(listOf(3L)))
assertThat(getExistingPipelineVersions(OTHER_ORGANISM), `is`(listOf(1L)))
}
}
Expand Down
Loading