Skip to content

Commit

Permalink
🎨 (general): Fix SonarQube issues in fin-narrator and org
Browse files Browse the repository at this point in the history
  • Loading branch information
byte-sized-emi authored and d135-1r43 committed Jan 26, 2025
1 parent 5b91116 commit 7a28893
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import dev.langchain4j.service.UserMessage;
import io.quarkiverse.langchain4j.RegisterAiService;
import jakarta.json.JsonObject;
import jakarta.json.JsonValue;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ quarkus.keycloak.admin-client.username=admin
quarkus.keycloak.admin-client.password=admin
quarkus.keycloak.admin-client.grant-type=PASSWORD
quarkus.keycloak.devservices.port=8554
quarkus.keycloak.devservices.realm-name=quarkus
quarkus.keycloak.devservices.realm-name=${app.hopps.org.auth.realm-name}
quarkus.oidc.devui.web-client-timeout=20S
%prod.quarkus.keycloak.devservices.enabled=false
%dev.quarkus.keycloak.devservices.realm-path=quarkus-realm.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.ArgumentMatchers.any;

@QuarkusTest
class NewOrganizationInvalidateTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import java.util.HashMap;
import java.util.Map;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void disallowRootWithoutOrganization() {
void allowOrganizationWithoutRoot() {
Organization org = BommelTestResourceCreator.generateOrganization();

orgRepo.persist(org);
assertDoesNotThrow(() -> orgRepo.persist(org));
}

@Test
Expand Down Expand Up @@ -373,7 +373,7 @@ void simpleBommelMoveWorks() {
void organizationsCanCoexist() throws URISyntaxException, MalformedURLException {
resourceCreator.setupTwoTreesAndOrgs();

repo.ensureConsistency();
assertDoesNotThrow(() -> repo.ensureConsistency());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
package app.hopps.org.rest;

import app.hopps.org.jpa.Organization;
import app.hopps.org.jpa.OrganizationRepository;
import io.quarkus.test.common.http.TestHTTPEndpoint;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.security.TestSecurity;
import jakarta.inject.Inject;
import jakarta.ws.rs.core.MediaType;
import org.flywaydb.core.Flyway;
import org.instancio.Instancio;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;

import java.nio.file.Files;
import java.nio.file.Paths;
import java.sql.SQLException;

import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.is;
import static org.slf4j.LoggerFactory.getLogger;

@QuarkusTest
@TestHTTPEndpoint(OrganizationResource.class)
Expand All @@ -30,7 +21,7 @@ class OrganizationResourceAuthorizedTests {
Flyway flyway;

@BeforeEach
public void cleanDatabase() throws Exception {
public void cleanDatabase() {
flyway.clean();
flyway.migrate();
}
Expand Down

0 comments on commit 7a28893

Please sign in to comment.