-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
299 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="All UT" type="JUnit" factoryName="JUnit"> | ||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" /> | ||
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-21" /> | ||
<option name="PACKAGE_NAME" value="com.michibaum" /> | ||
<option name="MAIN_CLASS_NAME" value="" /> | ||
<option name="METHOD_NAME" value="" /> | ||
<option name="TEST_OBJECT" value="pattern" /> | ||
<option name="TEST_SEARCH_SCOPE"> | ||
<value defaultName="wholeProject" /> | ||
</option> | ||
<patterns> | ||
<pattern testClass="^(.*UT$).*$" /> | ||
</patterns> | ||
<method v="2"> | ||
<option name="Make" enabled="true" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
admin-service/src/test/kotlin/com/michibaum/admin_service/AdminServiceApplicationIT.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.michibaum.admin_service | ||
|
||
import org.junit.jupiter.api.Assertions.* | ||
import org.junit.jupiter.api.Test | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.boot.test.context.SpringBootTest | ||
import org.springframework.context.ApplicationContext | ||
|
||
|
||
@SpringBootTest | ||
class AdminServiceApplicationIT { | ||
|
||
@Autowired | ||
lateinit var applicationContext: ApplicationContext | ||
|
||
@Test | ||
fun contextLoads() { | ||
assertNotNull(applicationContext) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...rc/test/kotlin/com/michibaum/authentication_service/AuthenticationServiceApplicationIT.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.michibaum.authentication_service | ||
|
||
import org.junit.jupiter.api.Assertions.* | ||
import org.junit.jupiter.api.Test | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.boot.test.context.SpringBootTest | ||
import org.springframework.context.ApplicationContext | ||
|
||
@SpringBootTest | ||
class AuthenticationServiceApplicationIT { | ||
|
||
@Autowired | ||
lateinit var applicationContext: ApplicationContext | ||
|
||
@Test | ||
fun contextLoads() { | ||
assertNotNull(applicationContext) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
gateway-service/src/main/kotlin/com/michibaum/gatewayservice/FeignResponseCoderConfig.java
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
gateway-service/src/main/kotlin/com/michibaum/gatewayservice/FeignResponseCoderConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.michibaum.gatewayservice | ||
|
||
import feign.codec.Decoder | ||
import feign.codec.Encoder | ||
import org.springframework.beans.factory.ObjectFactory | ||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters | ||
import org.springframework.cloud.openfeign.support.SpringDecoder | ||
import org.springframework.cloud.openfeign.support.SpringEncoder | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
/** | ||
* https://github.com/spring-cloud/spring-cloud-openfeign/issues/235 | ||
* fanticat opened this issue on Oct 22, 2019 · 10 comments | ||
*/ | ||
@Configuration | ||
class FeignResponseCoderConfig { | ||
|
||
private val messageConverters = ObjectFactory { HttpMessageConverters() } | ||
|
||
@Bean | ||
fun feignEncoder(): Encoder { | ||
return SpringEncoder(messageConverters) | ||
} | ||
|
||
@Bean | ||
fun feignDecoder(): Decoder { | ||
return SpringDecoder(messageConverters) | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
gateway-service/src/test/kotlin/com/michibaum/gatewayservice/GatewayServiceApplicationIT.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.michibaum.gatewayservice | ||
|
||
import org.junit.jupiter.api.Assertions.* | ||
import org.junit.jupiter.api.Test | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.boot.test.context.SpringBootTest | ||
import org.springframework.context.ApplicationContext | ||
|
||
@SpringBootTest | ||
class GatewayServiceApplicationIT { | ||
|
||
@Autowired | ||
lateinit var applicationContext: ApplicationContext | ||
|
||
@Test | ||
fun contextLoads() { | ||
assertNotNull(applicationContext) | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
javadoc-service/src/test/kotlin/com/michibaum/javadoc_service/JavadocServiceApplicationIT.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.michibaum.javadoc_service | ||
|
||
import org.junit.jupiter.api.Assertions.* | ||
import org.junit.jupiter.api.Test | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.boot.test.context.SpringBootTest | ||
import org.springframework.context.ApplicationContext | ||
|
||
@SpringBootTest | ||
class JavadocServiceApplicationIT { | ||
|
||
@Autowired | ||
lateinit var applicationContext: ApplicationContext | ||
|
||
@Test | ||
fun contextLoads() { | ||
assertNotNull(applicationContext) | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...ry-service/src/test/kotlin/com/michibaum/registry_service/RegistryServiceApplicationIT.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.michibaum.registry_service | ||
|
||
import org.junit.jupiter.api.Assertions.* | ||
import org.junit.jupiter.api.Test | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.boot.test.context.SpringBootTest | ||
import org.springframework.context.ApplicationContext | ||
|
||
@SpringBootTest | ||
class RegistryServiceApplicationIT { | ||
|
||
@Autowired | ||
lateinit var applicationContext: ApplicationContext | ||
|
||
@Test | ||
fun contextLoads() { | ||
assertNotNull(applicationContext) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...management-service/src/main/kotlin/com/michibaum/usermanagement_service/UserRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package com.michibaum.usermanagement_service | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository | ||
import org.springframework.stereotype.Repository | ||
|
||
@Repository | ||
interface UserRepository : JpaRepository<User, String> { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...nagement-service/src/test/kotlin/com/michibaum/usermanagement_service/UserRepositoryIT.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.michibaum.usermanagement_service | ||
|
||
import org.junit.jupiter.api.Assertions.assertEquals | ||
import org.junit.jupiter.api.Test | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest | ||
|
||
@DataJpaTest | ||
class UserRepositoryIT { | ||
|
||
@Autowired | ||
private lateinit var userRepository: UserRepository | ||
|
||
@Test | ||
fun `find with no database content`(){ | ||
// GIVEN | ||
|
||
|
||
// WHEN | ||
var result = userRepository.findAll() | ||
|
||
// THEN | ||
assertEquals(0, result.size) | ||
|
||
} | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
usermanagement-service/src/test/kotlin/com/michibaum/usermanagement_service/UserServiceUT.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.michibaum.usermanagement_service | ||
|
||
import org.junit.jupiter.api.Assertions.* | ||
|
||
class UserServiceUT |
19 changes: 19 additions & 0 deletions
19
...rc/test/kotlin/com/michibaum/usermanagement_service/UsermanagementServiceApplicationIT.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.michibaum.usermanagement_service | ||
|
||
import org.junit.jupiter.api.Assertions.* | ||
import org.junit.jupiter.api.Test | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.boot.test.context.SpringBootTest | ||
import org.springframework.context.ApplicationContext | ||
|
||
@SpringBootTest | ||
class UsermanagementServiceApplicationIT { | ||
|
||
@Autowired | ||
lateinit var applicationContext: ApplicationContext | ||
|
||
@Test | ||
fun contextLoads() { | ||
assertNotNull(applicationContext) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
server: | ||
shutdown: graceful | ||
undertow: | ||
url-charset: UTF-8 | ||
|
||
spring: | ||
threads: | ||
virtual: | ||
enabled: true | ||
lifecycle: | ||
timeout-per-shutdown-phase: 20s | ||
application: | ||
name: usermanagement-service | ||
cloud: | ||
discovery: | ||
client: | ||
health-indicator: | ||
include-description: true | ||
main: | ||
allow-bean-definition-overriding: true | ||
datasource: | ||
username: sa | ||
password: password | ||
driver-class-name: org.h2.Driver | ||
url: jdbc:h2:mem:usermanagement-db | ||
jpa: | ||
hibernate: | ||
ddl-auto: create-drop | ||
properties: | ||
hibernate: | ||
globally_quoted_identifiers: true | ||
|
||
eureka: | ||
instance: | ||
prefer-ip-address: true | ||
client: | ||
enabled: true | ||
fetch-registry: true | ||
register-with-eureka: true | ||
refresh: | ||
enable: true | ||
|
||
management: | ||
endpoints: | ||
enabled-by-default: true | ||
web: | ||
exposure: | ||
include: "*" | ||
endpoint: | ||
env: | ||
post: | ||
enabled: true | ||
health: | ||
show-details: always | ||
probes: | ||
enabled: true | ||
health: | ||
livenessstate: | ||
enabled: true | ||
readinessstate: | ||
enabled: true | ||
info: | ||
git: | ||
mode: full |
Oops, something went wrong.