diff --git a/src/main/java/io/codeka/gaia/registries/RegistryRawContent.kt b/src/main/java/io/codeka/gaia/registries/RegistryRawContent.kt index 63e0caa1d..0eed04a29 100644 --- a/src/main/java/io/codeka/gaia/registries/RegistryRawContent.kt +++ b/src/main/java/io/codeka/gaia/registries/RegistryRawContent.kt @@ -7,7 +7,6 @@ import org.springframework.http.HttpMethod import org.springframework.http.HttpStatus import org.springframework.web.client.RestTemplate import java.util.* -import java.util.regex.Pattern abstract class RegistryRawContent(private val registryType: RegistryType, private val restTemplate: RestTemplate) { diff --git a/src/main/java/io/codeka/gaia/registries/github/GitHubRawContent.kt b/src/main/java/io/codeka/gaia/registries/github/GitHubRawContent.kt index 7af345b49..11027dc81 100644 --- a/src/main/java/io/codeka/gaia/registries/github/GitHubRawContent.kt +++ b/src/main/java/io/codeka/gaia/registries/github/GitHubRawContent.kt @@ -1,10 +1,9 @@ package io.codeka.gaia.registries.github -import io.codeka.gaia.registries.RegistryType import io.codeka.gaia.registries.RegistryRawContent +import io.codeka.gaia.registries.RegistryType import org.springframework.stereotype.Component import org.springframework.web.client.RestTemplate -import java.util.regex.Pattern @Component class GitHubRawContent(restTemplate: RestTemplate) : RegistryRawContent(RegistryType.GITHUB, restTemplate) diff --git a/src/main/java/io/codeka/gaia/registries/github/GithubRegistryApi.kt b/src/main/java/io/codeka/gaia/registries/github/GithubRegistryApi.kt index 2bf1c950e..e6019b629 100644 --- a/src/main/java/io/codeka/gaia/registries/github/GithubRegistryApi.kt +++ b/src/main/java/io/codeka/gaia/registries/github/GithubRegistryApi.kt @@ -1,6 +1,6 @@ package io.codeka.gaia.registries.github -import com.fasterxml.jackson.annotation.* +import com.fasterxml.jackson.annotation.JsonAlias import io.codeka.gaia.registries.AbstractRegistryApi import io.codeka.gaia.registries.RegistryType import io.codeka.gaia.registries.SourceRepository diff --git a/src/main/java/io/codeka/gaia/registries/gitlab/GitLabRawContent.kt b/src/main/java/io/codeka/gaia/registries/gitlab/GitLabRawContent.kt index 9c0c1e6de..9336b3af4 100644 --- a/src/main/java/io/codeka/gaia/registries/gitlab/GitLabRawContent.kt +++ b/src/main/java/io/codeka/gaia/registries/gitlab/GitLabRawContent.kt @@ -1,10 +1,9 @@ package io.codeka.gaia.registries.gitlab -import io.codeka.gaia.registries.RegistryType import io.codeka.gaia.registries.RegistryRawContent +import io.codeka.gaia.registries.RegistryType import org.springframework.stereotype.Component import org.springframework.web.client.RestTemplate -import java.util.regex.Pattern @Component class GitLabRawContent(restTemplate: RestTemplate) : RegistryRawContent(RegistryType.GITLAB, restTemplate) \ No newline at end of file diff --git a/src/main/java/io/codeka/gaia/registries/gitlab/GitlabRegistryApi.kt b/src/main/java/io/codeka/gaia/registries/gitlab/GitlabRegistryApi.kt index 21325b854..86e792944 100644 --- a/src/main/java/io/codeka/gaia/registries/gitlab/GitlabRegistryApi.kt +++ b/src/main/java/io/codeka/gaia/registries/gitlab/GitlabRegistryApi.kt @@ -1,6 +1,6 @@ package io.codeka.gaia.registries.gitlab -import com.fasterxml.jackson.annotation.* +import com.fasterxml.jackson.annotation.JsonAlias import io.codeka.gaia.registries.AbstractRegistryApi import io.codeka.gaia.registries.RegistryType import io.codeka.gaia.registries.SourceRepository diff --git a/src/main/resources/templates/modules.html b/src/main/resources/templates/modules.html index f68983718..91c62e95e 100644 --- a/src/main/resources/templates/modules.html +++ b/src/main/resources/templates/modules.html @@ -1,5 +1,5 @@ - + Gaia - Modules diff --git a/src/test/java/io/codeka/gaia/e2e/ModulesPage.kt b/src/test/java/io/codeka/gaia/e2e/ModulesPage.kt index 4c9887ddb..4e867fcf1 100644 --- a/src/test/java/io/codeka/gaia/e2e/ModulesPage.kt +++ b/src/test/java/io/codeka/gaia/e2e/ModulesPage.kt @@ -3,9 +3,6 @@ package io.codeka.gaia.e2e import org.openqa.selenium.By import org.openqa.selenium.WebDriver import org.openqa.selenium.WebElement -import org.openqa.selenium.support.FindAll -import org.openqa.selenium.support.FindBy -import org.openqa.selenium.support.FindBys class ModulesPage (webDriver: WebDriver){ diff --git a/src/test/java/io/codeka/gaia/e2e/SeleniumIT.java b/src/test/java/io/codeka/gaia/e2e/SeleniumIT.java index c813cdba7..e5d6ae40b 100644 --- a/src/test/java/io/codeka/gaia/e2e/SeleniumIT.java +++ b/src/test/java/io/codeka/gaia/e2e/SeleniumIT.java @@ -8,8 +8,6 @@ import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxOptions; import org.openqa.selenium.support.PageFactory; diff --git a/src/test/java/io/codeka/gaia/registries/github/GitHubRawContentTest.java b/src/test/java/io/codeka/gaia/registries/github/GitHubRawContentTest.java index 2d3190919..628542507 100644 --- a/src/test/java/io/codeka/gaia/registries/github/GitHubRawContentTest.java +++ b/src/test/java/io/codeka/gaia/registries/github/GitHubRawContentTest.java @@ -1,9 +1,9 @@ package io.codeka.gaia.registries.github; +import io.codeka.gaia.modules.bo.TerraformModule; import io.codeka.gaia.registries.RegistryDetails; import io.codeka.gaia.registries.RegistryFile; import io.codeka.gaia.registries.RegistryType; -import io.codeka.gaia.modules.bo.TerraformModule; import io.codeka.gaia.teams.OAuth2User; import io.codeka.gaia.teams.User; import org.bson.internal.Base64; @@ -22,7 +22,8 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; diff --git a/src/test/java/io/codeka/gaia/registries/github/GithubRegistryApiTest.kt b/src/test/java/io/codeka/gaia/registries/github/GithubRegistryApiTest.kt index ce14e124f..7fa0dd318 100644 --- a/src/test/java/io/codeka/gaia/registries/github/GithubRegistryApiTest.kt +++ b/src/test/java/io/codeka/gaia/registries/github/GithubRegistryApiTest.kt @@ -6,7 +6,6 @@ import io.codeka.gaia.teams.OAuth2User import io.codeka.gaia.teams.User import org.assertj.core.api.Assertions.assertThat import org.bson.internal.Base64 -import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.test.autoconfigure.web.client.AutoConfigureWebClient @@ -18,7 +17,6 @@ import org.springframework.test.web.client.match.MockRestRequestMatchers.request import org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess import java.nio.charset.Charset - @RestClientTest(GithubRegistryApi::class) @AutoConfigureWebClient(registerRestTemplate = true) class GithubRegistryApiTest{ diff --git a/src/test/java/io/codeka/gaia/registries/gitlab/GitLabRawContentTest.java b/src/test/java/io/codeka/gaia/registries/gitlab/GitLabRawContentTest.java index 69aad8b46..0344e5517 100644 --- a/src/test/java/io/codeka/gaia/registries/gitlab/GitLabRawContentTest.java +++ b/src/test/java/io/codeka/gaia/registries/gitlab/GitLabRawContentTest.java @@ -1,9 +1,9 @@ package io.codeka.gaia.registries.gitlab; +import io.codeka.gaia.modules.bo.TerraformModule; import io.codeka.gaia.registries.RegistryDetails; import io.codeka.gaia.registries.RegistryFile; import io.codeka.gaia.registries.RegistryType; -import io.codeka.gaia.modules.bo.TerraformModule; import io.codeka.gaia.teams.OAuth2User; import io.codeka.gaia.teams.User; import org.bson.internal.Base64; @@ -22,7 +22,8 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; diff --git a/src/test/java/io/codeka/gaia/teams/controller/TeamsRestControllerIT.java b/src/test/java/io/codeka/gaia/teams/controller/TeamsRestControllerIT.java index a7351ace7..350fe77f1 100644 --- a/src/test/java/io/codeka/gaia/teams/controller/TeamsRestControllerIT.java +++ b/src/test/java/io/codeka/gaia/teams/controller/TeamsRestControllerIT.java @@ -5,7 +5,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.security.access.AccessDeniedException; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.web.servlet.MockMvc; @@ -15,7 +14,6 @@ import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.hasSize; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; -import static org.junit.jupiter.api.Assertions.assertThrows; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;