From 42fff2c38b9c8fa3f82b6c6ea68395742addf61d Mon Sep 17 00:00:00 2001 From: Robert Mathew Date: Fri, 5 Jul 2024 18:54:40 +0530 Subject: [PATCH] Feature/oidf 45 status endpoint (#6) * Moved admin-server to modules --- .fleet/run.json | 2 +- admin-server/README.md | 19 ------------------- modules/admin-server/README.md | 19 +++++++++++++++++++ .../admin-server}/build.gradle.kts | 2 +- .../oid/fed/server/admin}/Application.kt | 2 +- .../src/main/resources/application.properties | 0 .../oid/fed/server/admin}/ApplicationTests.kt | 2 +- .../fed/server/admin}/StatusEndpointTest.kt | 2 +- settings.gradle.kts | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 admin-server/README.md create mode 100644 modules/admin-server/README.md rename {admin-server => modules/admin-server}/build.gradle.kts (94%) rename {admin-server/src/main/kotlin/com/sphereon/oid/fed => modules/admin-server/src/main/kotlin/com/sphereon/oid/fed/server/admin}/Application.kt (84%) rename {admin-server => modules/admin-server}/src/main/resources/application.properties (100%) rename {admin-server/src/test/kotlin/com/sphereon/oid/fed => modules/admin-server/src/test/kotlin/com/sphereon/oid/fed/server/admin}/ApplicationTests.kt (80%) rename {admin-server/src/test/kotlin/com/sphereon/oid/fed => modules/admin-server/src/test/kotlin/com/sphereon/oid/fed/server/admin}/StatusEndpointTest.kt (95%) diff --git a/.fleet/run.json b/.fleet/run.json index b3f28c35..f360fcd9 100644 --- a/.fleet/run.json +++ b/.fleet/run.json @@ -5,7 +5,7 @@ "type": "gradle", "workingDir": "$PROJECT_DIR$", "tasks": [ - ":admin-server:build" + ":modules:admin-server:build" ], "args": [ "" diff --git a/admin-server/README.md b/admin-server/README.md deleted file mode 100644 index eab39d24..00000000 --- a/admin-server/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Admin server - -API -
-```/status``` - To check health status - -
- -To build -
-```./gradlew admin-server:build``` - -To run -
-```./gradlew admin-server:bootRun``` - -To run tests -
-```./gradlew admin-server:test``` \ No newline at end of file diff --git a/modules/admin-server/README.md b/modules/admin-server/README.md new file mode 100644 index 00000000..5081c690 --- /dev/null +++ b/modules/admin-server/README.md @@ -0,0 +1,19 @@ +# Admin server + +API +
+```/status``` - To check health status + +
+ +To build +
+```./gradlew :modules:admin-server:build``` + +To run +
+```./gradlew :modules:admin-server:bootRun``` + +To run tests +
+```./gradlew :modules:admin-server:test``` \ No newline at end of file diff --git a/admin-server/build.gradle.kts b/modules/admin-server/build.gradle.kts similarity index 94% rename from admin-server/build.gradle.kts rename to modules/admin-server/build.gradle.kts index e856481f..d7e90794 100644 --- a/admin-server/build.gradle.kts +++ b/modules/admin-server/build.gradle.kts @@ -6,7 +6,7 @@ plugins { application } -group = "com.sphereon.oid.fed" +group = "com.sphereon.oid.fed.server.admin" version = "1.0.0" java { diff --git a/admin-server/src/main/kotlin/com/sphereon/oid/fed/Application.kt b/modules/admin-server/src/main/kotlin/com/sphereon/oid/fed/server/admin/Application.kt similarity index 84% rename from admin-server/src/main/kotlin/com/sphereon/oid/fed/Application.kt rename to modules/admin-server/src/main/kotlin/com/sphereon/oid/fed/server/admin/Application.kt index 2d2fe659..654f00f7 100644 --- a/admin-server/src/main/kotlin/com/sphereon/oid/fed/Application.kt +++ b/modules/admin-server/src/main/kotlin/com/sphereon/oid/fed/server/admin/Application.kt @@ -1,4 +1,4 @@ -package com.sphereon.oid.fed +package com.sphereon.oid.fed.server.admin import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.runApplication diff --git a/admin-server/src/main/resources/application.properties b/modules/admin-server/src/main/resources/application.properties similarity index 100% rename from admin-server/src/main/resources/application.properties rename to modules/admin-server/src/main/resources/application.properties diff --git a/admin-server/src/test/kotlin/com/sphereon/oid/fed/ApplicationTests.kt b/modules/admin-server/src/test/kotlin/com/sphereon/oid/fed/server/admin/ApplicationTests.kt similarity index 80% rename from admin-server/src/test/kotlin/com/sphereon/oid/fed/ApplicationTests.kt rename to modules/admin-server/src/test/kotlin/com/sphereon/oid/fed/server/admin/ApplicationTests.kt index e9539f43..3f3e34e3 100644 --- a/admin-server/src/test/kotlin/com/sphereon/oid/fed/ApplicationTests.kt +++ b/modules/admin-server/src/test/kotlin/com/sphereon/oid/fed/server/admin/ApplicationTests.kt @@ -1,4 +1,4 @@ -package com.sphereon.oid.fed +package com.sphereon.oid.fed.server.admin import org.junit.jupiter.api.Test import org.springframework.boot.test.context.SpringBootTest diff --git a/admin-server/src/test/kotlin/com/sphereon/oid/fed/StatusEndpointTest.kt b/modules/admin-server/src/test/kotlin/com/sphereon/oid/fed/server/admin/StatusEndpointTest.kt similarity index 95% rename from admin-server/src/test/kotlin/com/sphereon/oid/fed/StatusEndpointTest.kt rename to modules/admin-server/src/test/kotlin/com/sphereon/oid/fed/server/admin/StatusEndpointTest.kt index 9e3af1ad..e1014b98 100644 --- a/admin-server/src/test/kotlin/com/sphereon/oid/fed/StatusEndpointTest.kt +++ b/modules/admin-server/src/test/kotlin/com/sphereon/oid/fed/server/admin/StatusEndpointTest.kt @@ -1,4 +1,4 @@ -package com.sphereon.oid.fed +package com.sphereon.oid.fed.server.admin import org.junit.jupiter.api.Test import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc diff --git a/settings.gradle.kts b/settings.gradle.kts index a7cd08e0..1e991276 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -29,4 +29,4 @@ dependencyResolutionManagement { } include(":modules:openid-federation-common") -include(":admin-server") +include(":modules:admin-server")