Skip to content

Commit

Permalink
Sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
samleeflang committed Nov 2, 2022
1 parent 94063c8 commit b8969db
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Dsonar.projectKey=DiSSCo_${{ github.event.repository.name }}
-Dsonar.exclusions=**/jooq/**
-Dsonar.coverage.exclusions=**/properties/**,**/configuration/**
-Dsonar.coverage.exclusions=**/properties/**,**/configuration/**,**/domain/**,**/exception/**
- name: Login to Public ECR
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import java.time.Instant;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import lombok.RequiredArgsConstructor;
import org.jooq.DSLContext;
import org.jooq.JSONB;
Expand Down Expand Up @@ -49,7 +48,8 @@ private DigitalSpecimenRecord mapDigitalSpecimen(Record dbRecord) {
digitalSpecimen);
}

public int[] createDigitalSpecimenRecord(Collection<DigitalSpecimenRecord> digitalSpecimenRecords) {
public int[] createDigitalSpecimenRecord(
Collection<DigitalSpecimenRecord> digitalSpecimenRecords) {
var queries = digitalSpecimenRecords.stream().map(this::specimenToQuery).toList();
return context.batch(queries).execute();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ void testUpdateVersionSpecimens() {
givenDigitalSpecimenRecord("20.5000.1025/YYY-YYY-YYY", "TEST_2")));

// When
repository.createDigitalSpecimenRecord(List.of(givenDigitalSpecimenRecord(2)));
var result = repository.createDigitalSpecimenRecord(List.of(givenDigitalSpecimenRecord(2)));

// Then
assertThat(result).isEqualTo(new int[]{1});
}

@Test
Expand Down

0 comments on commit b8969db

Please sign in to comment.