ping
All checks were successful
Build and test FrontEnd / Build (pull_request) Successful in 33s
Build and test FrontEnd / Test (pull_request) Successful in 21s

This commit is contained in:
Debucquoy Anthony 2024-02-23 10:36:26 +01:00
parent 02cefc7e08
commit 9b24434108
Signed by: tonitch
GPG Key ID: A78D6421F083D42E
7 changed files with 32 additions and 32 deletions

3
.gitignore vendored
View File

@ -3,3 +3,6 @@
# Ignore Gradle build output directory
build
.project
.settings

View File

@ -16,17 +16,17 @@ repositories {
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-jdbc")
// implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-mail")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.session:spring-session-jdbc")
// implementation("org.springframework.session:spring-session-jdbc")
developmentOnly("org.springframework.boot:spring-boot-devtools")
developmentOnly("org.springframework.boot:spring-boot-docker-compose")
// developmentOnly("org.springframework.boot:spring-boot-docker-compose")
runtimeOnly("org.postgresql:postgresql")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:postgresql")
// testImplementation("org.springframework.boot:spring-boot-testcontainers")
// testImplementation("org.testcontainers:junit-jupiter")
// testImplementation("org.testcontainers:postgresql")
}
tasks.register("run") {

View File

@ -9,5 +9,4 @@ public class ClydeApplication {
public static void main(String[] args) {
SpringApplication.run(ClydeApplication.class, args);
}
}

View File

@ -0,0 +1,18 @@
package ovh.herisson.Clyde.EndPoints;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import ovh.herisson.Clyde.Ping;
@RestController
public class PingController {
@GetMapping("/ping")
public Ping ping(){
return new Ping(1, "test");
}
}

View File

@ -0,0 +1,3 @@
package ovh.herisson.Clyde;
public record Ping(int id, String txt){};

View File

@ -1,9 +1,9 @@
package ovh.herisson.Clyde;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
// import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
// @SpringBootTest
class ClydeApplicationTests {
@Test

View File

@ -1,23 +0,0 @@
package ovh.herisson.Clyde;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.context.annotation.Bean;
import org.testcontainers.containers.PostgreSQLContainer;
import org.testcontainers.utility.DockerImageName;
@TestConfiguration(proxyBeanMethods = false)
public class TestClydeApplication {
@Bean
@ServiceConnection
PostgreSQLContainer<?> postgresContainer() {
return new PostgreSQLContainer<>(DockerImageName.parse("postgres:latest"));
}
public static void main(String[] args) {
SpringApplication.from(ClydeApplication::main).with(TestClydeApplication.class).run(args);
}
}