From 665361a4e38d2bb6f6e84384878a94fed0c10ccb Mon Sep 17 00:00:00 2001 From: Shikhar Pandya Date: Tue, 28 Oct 2025 00:05:47 +0530 Subject: [PATCH 01/11] [Added a script for auto syncing forks of parent repository] Beta #1 --- .gitea/workflows/test_image_build_push.yml | 71 +++++++++++++++++++--- 1 file changed, 62 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/test_image_build_push.yml b/.gitea/workflows/test_image_build_push.yml index f53e140..edda211 100644 --- a/.gitea/workflows/test_image_build_push.yml +++ b/.gitea/workflows/test_image_build_push.yml @@ -1,8 +1,10 @@ name: sample gradle build and test -run-name: Build started by $ {{gitea.actor}} +run-name: Build started by ${{ gitea.actor }} + on: push: branches: [test] + jobs: tag: runs-on: ubuntu-latest @@ -13,17 +15,20 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Get new version id: new_version run: | VERSION=$(git describe --tags --abbrev=0) - echo ${VERSION} + echo "Current version: ${VERSION}" MAJOR=$(echo ${VERSION} | cut -d "." -f 1) MINOR=$(echo ${VERSION} | cut -d "." -f 2) PATCH=$(echo ${VERSION} | cut -d "." -f 3) - NEW_PATCH=$(( ${PATCH} + 1)) - echo ${NEW_PATCH} - echo "new_version=$(echo "${MAJOR}.${MINOR}.${NEW_PATCH}")" >> $GITHUB_OUTPUT + NEW_PATCH=$((PATCH + 1)) + NEW_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}" + echo "New version: ${NEW_VERSION}" + echo "new_version=${NEW_VERSION}" >> $GITHUB_OUTPUT + build_tag_push: runs-on: ubuntu-latest needs: tag @@ -34,31 +39,79 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - name: JDK setup uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' + - name: Validate Gradle Wrapper uses: gradle/actions/wrapper-validation@v3 + - name: Create and push tag run: | - echo "NEW_VERSION=${{ needs.tag.outputs.new_version }}" - git config --global user.name "${{gitea.actor}}" + echo "New version: ${{ needs.tag.outputs.new_version }}" + git config --global user.name "${{ gitea.actor }}" git config --global user.email "${{ gitea.actor }}@users.noreply.github.com" - git tag -a ${{ needs.tag.outputs.new_version }} -m "Pushing new version ${{ needs.tag.outputs.new_version }}" - git push origin ${{ needs.tag.outputs.new_version }} + git tag -a "${{ needs.tag.outputs.new_version }}" -m "Pushing new version ${{ needs.tag.outputs.new_version }}" + git push origin "${{ needs.tag.outputs.new_version }}" + - name: Log in to Gitea Docker Registry uses: docker/login-action@v3 with: registry: 'http://192.168.0.100:8928' username: hitanshu password: ${{ secrets.TOKEN }} + - name: Gradle build run: ./gradlew bootBuildImage --imageName=192.168.0.100:8928/hithomelabs/cftunnels:${{ needs.tag.outputs.new_version }} + - name: Tag image as test run: docker tag 192.168.0.100:8928/hithomelabs/cftunnels:${{ needs.tag.outputs.new_version }} 192.168.0.100:8928/hithomelabs/cftunnels:test + - name: Push to Gitea Registry run: | docker push 192.168.0.100:8928/hithomelabs/cftunnels:test docker push 192.168.0.100:8928/hithomelabs/cftunnels:${{ needs.tag.outputs.new_version }} + + sync_forks: + name: Sync All Forks + runs-on: ubuntu-latest + needs: build_tag_push + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Sync all forks via Gitea API + env: + TOKEN: ${{ secrets.TOKEN }} + BASE_URL: "https://gitea.hithomelabs.com/api/v1" + OWNER: "Hithomelabs" + REPO: "CFTunnels" + run: | + set -e + set -o pipefail + + echo "Fetching forks for $OWNER/$REPO..." + response=$(curl -s -X GET "$BASE_URL/repos/$OWNER/$REPO/forks" -H "Authorization: token $TOKEN") + + # Extract clone URLs of forked repos (excluding the parent repo) + filtered=$(echo "$response" | grep -o '"clone_url":"[^"]*"' | sed 's/"clone_url":"\([^"]*\)"/\1/' | grep -v "/$OWNER") + + echo "Detected forks:" + echo "$filtered" + + readarray -t forks <<< "$filtered" + + for fork_url in "${forks[@]}"; do + echo "🔄 Syncing fork: $fork_url" + git remote add fork "$fork_url" 2>/dev/null || git remote set-url fork "$fork_url" + if git push fork main --force >/dev/null 2>&1; then + echo "✅ Synced $fork_url successfully" + else + echo "❌ Failed to sync $fork_url" + fi + echo + done + -- 2.45.2 From ef7b6545db6de6147135ccfa69fa0db066a598b6 Mon Sep 17 00:00:00 2001 From: Shikhar Pandya Date: Tue, 28 Oct 2025 00:46:32 +0530 Subject: [PATCH 02/11] [Added a script for auto syncing forks of parent repository] Beta #2 --- .gitea/workflows/test_image_build_push.yml | 27 ++++------------------ 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/.gitea/workflows/test_image_build_push.yml b/.gitea/workflows/test_image_build_push.yml index edda211..546f0d5 100644 --- a/.gitea/workflows/test_image_build_push.yml +++ b/.gitea/workflows/test_image_build_push.yml @@ -84,34 +84,15 @@ jobs: uses: actions/checkout@v4 - name: Sync all forks via Gitea API - env: - TOKEN: ${{ secrets.TOKEN }} - BASE_URL: "https://gitea.hithomelabs.com/api/v1" - OWNER: "Hithomelabs" - REPO: "CFTunnels" run: | - set -e - set -o pipefail - - echo "Fetching forks for $OWNER/$REPO..." - response=$(curl -s -X GET "$BASE_URL/repos/$OWNER/$REPO/forks" -H "Authorization: token $TOKEN") - - # Extract clone URLs of forked repos (excluding the parent repo) - filtered=$(echo "$response" | grep -o '"clone_url":"[^"]*"' | sed 's/"clone_url":"\([^"]*\)"/\1/' | grep -v "/$OWNER") - + echo "Fetching forks for Hithomelabs/CFTunnels..." + response=$(curl -s -X GET "https://gitea.hithomelabs.com/api/v1/repos/Hithomelabs/CFTunnels/forks" -H "Authorization: token ${{secrets.TOKEN}}") + filtered=$(echo "$response" | grep -o '"clone_url":"[^"]*"' | sed 's/"clone_url":"\([^"]*\)"/\1/' | grep -v "/Hithomelabs") echo "Detected forks:" echo "$filtered" - readarray -t forks <<< "$filtered" - for fork_url in "${forks[@]}"; do echo "🔄 Syncing fork: $fork_url" - git remote add fork "$fork_url" 2>/dev/null || git remote set-url fork "$fork_url" - if git push fork main --force >/dev/null 2>&1; then - echo "✅ Synced $fork_url successfully" - else - echo "❌ Failed to sync $fork_url" - fi - echo + git push "$fork_url" test & done -- 2.45.2 From 46e8f614a0f192ddc3bd0dea142c0db78b710a90 Mon Sep 17 00:00:00 2001 From: Shikhar Pandya Date: Tue, 28 Oct 2025 01:12:58 +0530 Subject: [PATCH 03/11] [Added a script for auto syncing forks of parent repository] Beta #3 --- .gitea/workflows/test_image_build_push.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/test_image_build_push.yml b/.gitea/workflows/test_image_build_push.yml index 546f0d5..a4ed4ea 100644 --- a/.gitea/workflows/test_image_build_push.yml +++ b/.gitea/workflows/test_image_build_push.yml @@ -1,10 +1,8 @@ name: sample gradle build and test run-name: Build started by ${{ gitea.actor }} - on: push: branches: [test] - jobs: tag: runs-on: ubuntu-latest @@ -28,7 +26,6 @@ jobs: NEW_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}" echo "New version: ${NEW_VERSION}" echo "new_version=${NEW_VERSION}" >> $GITHUB_OUTPUT - build_tag_push: runs-on: ubuntu-latest needs: tag @@ -39,16 +36,13 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: JDK setup uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' - - name: Validate Gradle Wrapper uses: gradle/actions/wrapper-validation@v3 - - name: Create and push tag run: | echo "New version: ${{ needs.tag.outputs.new_version }}" @@ -56,25 +50,20 @@ jobs: git config --global user.email "${{ gitea.actor }}@users.noreply.github.com" git tag -a "${{ needs.tag.outputs.new_version }}" -m "Pushing new version ${{ needs.tag.outputs.new_version }}" git push origin "${{ needs.tag.outputs.new_version }}" - - name: Log in to Gitea Docker Registry uses: docker/login-action@v3 with: registry: 'http://192.168.0.100:8928' username: hitanshu password: ${{ secrets.TOKEN }} - - name: Gradle build run: ./gradlew bootBuildImage --imageName=192.168.0.100:8928/hithomelabs/cftunnels:${{ needs.tag.outputs.new_version }} - - name: Tag image as test run: docker tag 192.168.0.100:8928/hithomelabs/cftunnels:${{ needs.tag.outputs.new_version }} 192.168.0.100:8928/hithomelabs/cftunnels:test - - name: Push to Gitea Registry run: | docker push 192.168.0.100:8928/hithomelabs/cftunnels:test docker push 192.168.0.100:8928/hithomelabs/cftunnels:${{ needs.tag.outputs.new_version }} - sync_forks: name: Sync All Forks runs-on: ubuntu-latest @@ -82,7 +71,6 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Sync all forks via Gitea API run: | echo "Fetching forks for Hithomelabs/CFTunnels..." @@ -93,6 +81,6 @@ jobs: readarray -t forks <<< "$filtered" for fork_url in "${forks[@]}"; do echo "🔄 Syncing fork: $fork_url" - git push "$fork_url" test & + authed_url=$(echo "$fork_url" | sed "s#https://#https://${{secrets.TOKEN}}@#") + git push "$authed_url" test & done - -- 2.45.2 From 487539227190e1a126184b0a2f3ea04c60edc2ed Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Fri, 14 Nov 2025 23:07:10 +0530 Subject: [PATCH 04/11] ISSUE-44: Hithomelabs/HomeLabDocker#44 Adding an integration test --- .../java/com/hithomelabs/CFTunnels/Config/OpenApiConfig.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/hithomelabs/CFTunnels/Config/OpenApiConfig.java b/src/main/java/com/hithomelabs/CFTunnels/Config/OpenApiConfig.java index e24e6f5..1f2af4a 100644 --- a/src/main/java/com/hithomelabs/CFTunnels/Config/OpenApiConfig.java +++ b/src/main/java/com/hithomelabs/CFTunnels/Config/OpenApiConfig.java @@ -5,10 +5,12 @@ import io.swagger.v3.oas.models.servers.Server; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; import java.util.ArrayList; @Configuration +@Profile("!integration") public class OpenApiConfig { @Value("${api.baseUrl}") -- 2.45.2 From ffb33a49e40e9dbd3f4daf57f4953a4068b8ffa0 Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Fri, 14 Nov 2025 23:10:36 +0530 Subject: [PATCH 05/11] ISSUE-44: Hithomelabs/HomeLabDocker#44 Setting up workflow to run integration tests --- .gitea/workflows/integration_test.yaml | 26 +++++++++ .../application-integration.properties | 5 ++ .../CoudflareApiIntegrationTest.java | 53 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 .gitea/workflows/integration_test.yaml create mode 100644 src/main/resources/application-integration.properties create mode 100644 src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java diff --git a/.gitea/workflows/integration_test.yaml b/.gitea/workflows/integration_test.yaml new file mode 100644 index 0000000..2a46a19 --- /dev/null +++ b/.gitea/workflows/integration_test.yaml @@ -0,0 +1,26 @@ +name: Daily cloudflare API integration test +on: + push: + branches: [ test ] +# schedule: +# - cron: '0 * * * *' # Every hour +# workflow_dispatch: + +jobs: + cloudflare-api-test: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: JDK setup + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + - name: Run integration tests with Cloudflare API + env: + SPRING_PROFILES_ACTIVE: integration + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }} + CLOUDFLARE_EMAIL: hitanshu98@gmail.com + run: ./gradlew test --tests "com.hithomelabs.CFTunnels.Integration.CoudflareApiIntegrationTest" \ No newline at end of file diff --git a/src/main/resources/application-integration.properties b/src/main/resources/application-integration.properties new file mode 100644 index 0000000..d2ec183 --- /dev/null +++ b/src/main/resources/application-integration.properties @@ -0,0 +1,5 @@ +cloudflare.accountId=${CLOUDFLARE_ACCOUNT_ID} +cloudflare.apiKey=${CLOUDFLARE_API_KEY} +cloudflare.email=${CLOUDFLARE_EMAIL} + +api.baseUrl \ No newline at end of file diff --git a/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java b/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java new file mode 100644 index 0000000..94c3076 --- /dev/null +++ b/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java @@ -0,0 +1,53 @@ +package com.hithomelabs.CFTunnels.Integration; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.hithomelabs.CFTunnels.Config.CloudflareConfig; +import com.hithomelabs.CFTunnels.Headers.AuthKeyEmailHeader; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.test.context.ActiveProfiles; + +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("integration") +public class CoudflareApiIntegrationTest { + + @Autowired + TestRestTemplate restTemplate; + + @Autowired + AuthKeyEmailHeader authKeyEmailHeader; + + @Autowired + CloudflareConfig cloudflareConfig; + + private static ObjectMapper mapper = new ObjectMapper(); + + @Test + @DisplayName("Calls cloudflare cfd tunnels API and checks that dev tunnel should be a part of the response") + public void getTunnelsTest(){ + + // * * Resource URL to hit get request at + String url = "https://api.cloudflare.com/client/v4/accounts/" + cloudflareConfig.getAccountId() + "/cfd_tunnel"; + HttpEntity httpEntity = new HttpEntity<>("", authKeyEmailHeader.getHttpHeaders()); + ResponseEntity response = restTemplate.exchange(url, HttpMethod.GET, httpEntity, Map.class); + assertEquals(HttpStatus.OK, response.getStatusCode()); + List> tunnelList = (List>) response.getBody().get("result"); + boolean hasName = tunnelList.stream() + .anyMatch(tunnel -> "devtunnel".equals(tunnel.get("name"))); + assertTrue(hasName); + } + +} -- 2.45.2 From 8039945f2a4d0e6f7270ecf44eabec20df737f68 Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Fri, 14 Nov 2025 23:11:57 +0530 Subject: [PATCH 06/11] ISSUE-44: Hithomelabs/HomeLabDocker#44 Minor bug fix --- src/main/resources/application-integration.properties | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/resources/application-integration.properties b/src/main/resources/application-integration.properties index d2ec183..055765b 100644 --- a/src/main/resources/application-integration.properties +++ b/src/main/resources/application-integration.properties @@ -1,5 +1,3 @@ cloudflare.accountId=${CLOUDFLARE_ACCOUNT_ID} cloudflare.apiKey=${CLOUDFLARE_API_KEY} cloudflare.email=${CLOUDFLARE_EMAIL} - -api.baseUrl \ No newline at end of file -- 2.45.2 From b2d58d6a6155a4bb3e53669b302d5d85388dc31e Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Fri, 14 Nov 2025 23:24:42 +0530 Subject: [PATCH 07/11] ISSUE-44: Hithomelabs/HomeLabDocker#44 Reducing logging verbiage, excuding integration test from test profile --- src/main/resources/application.properties | 6 ------ .../CFTunnels/Integration/CoudflareApiIntegrationTest.java | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 89201b8..a0264d2 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -4,12 +4,6 @@ cloudflare.apiKey=${CLOUDFLARE_API_KEY} cloudflare.email=${CLOUDFLARE_EMAIL} spring.profiles.active=${ENV} -# set root level -logging.level.root=INFO -# package-specific -logging.level.org.springframework=TRACE -logging.level.com.myapp=INFO - / * * Masking sure app works behind a reverse proxy server.forward-headers-strategy=framework diff --git a/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java b/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java index 94c3076..124d246 100644 --- a/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java +++ b/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java @@ -8,6 +8,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.context.annotation.Profile; import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; @@ -22,6 +23,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ActiveProfiles("integration") +@Profile("!test") public class CoudflareApiIntegrationTest { @Autowired -- 2.45.2 From b8bf2e8c671e3af1339884cf2ee6fcdbf214f7eb Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Fri, 14 Nov 2025 23:38:32 +0530 Subject: [PATCH 08/11] ISSUE-44: Hithomelabs/HomeLabDocker#44 Fixes bug reaated to integration test running during gradle build --- build.gradle | 3 +++ .../CFTunnels/Integration/CoudflareApiIntegrationTest.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 4328386..5fd8ad1 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,9 @@ java { test { systemProperty 'spring.profiles.active', 'test' + useJUnitPlatform { + excludeTags 'integration' + } } repositories { diff --git a/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java b/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java index 124d246..939e001 100644 --- a/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java +++ b/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.hithomelabs.CFTunnels.Config.CloudflareConfig; import com.hithomelabs.CFTunnels.Headers.AuthKeyEmailHeader; import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @@ -23,7 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ActiveProfiles("integration") -@Profile("!test") +@Tag("integration") public class CoudflareApiIntegrationTest { @Autowired -- 2.45.2 From e87fb6d153a64b563f89eab517285ad7793831b3 Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Sat, 15 Nov 2025 01:14:11 +0530 Subject: [PATCH 09/11] ISSUE-44: Hithomelabs/HomeLabDocker#44 Excluding integration tests from gradle build and runs them separately in integration tests --- .gitea/workflows/integration_test.yaml | 2 +- build.gradle | 8 ++++++++ settings.gradle | 1 - .../Integration/CoudflareApiIntegrationTest.java | 1 - 4 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 settings.gradle diff --git a/.gitea/workflows/integration_test.yaml b/.gitea/workflows/integration_test.yaml index 2a46a19..3a4697c 100644 --- a/.gitea/workflows/integration_test.yaml +++ b/.gitea/workflows/integration_test.yaml @@ -23,4 +23,4 @@ jobs: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }} CLOUDFLARE_EMAIL: hitanshu98@gmail.com - run: ./gradlew test --tests "com.hithomelabs.CFTunnels.Integration.CoudflareApiIntegrationTest" \ No newline at end of file + run: ./gradlew integrationTestOnly \ No newline at end of file diff --git a/build.gradle b/build.gradle index 5fd8ad1..c85d1f3 100644 --- a/build.gradle +++ b/build.gradle @@ -20,6 +20,14 @@ test { } } +tasks.register('integrationTestOnly', Test) { + useJUnitPlatform { + includeTags 'integration' + } + description = 'Runs only integration tests tagged with @Tag("integration")' + group = 'verification' +} + repositories { mavenCentral() } diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 3561707..0000000 --- a/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'CFTunnels' diff --git a/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java b/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java index 939e001..0ce0bc0 100644 --- a/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java +++ b/src/test/java/com/hithomelabs/CFTunnels/Integration/CoudflareApiIntegrationTest.java @@ -9,7 +9,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.context.annotation.Profile; import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; -- 2.45.2 From 8b220640404e89cb53ed9a5318a0e294a7a44275 Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Sat, 15 Nov 2025 01:22:29 +0530 Subject: [PATCH 10/11] ISSUE-44: Hithomelabs/HomeLabDocker#44 Executing integration test every 6 hours --- .gitea/workflows/integration_test.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/integration_test.yaml b/.gitea/workflows/integration_test.yaml index 3a4697c..688f37b 100644 --- a/.gitea/workflows/integration_test.yaml +++ b/.gitea/workflows/integration_test.yaml @@ -1,10 +1,8 @@ name: Daily cloudflare API integration test on: - push: - branches: [ test ] -# schedule: -# - cron: '0 * * * *' # Every hour -# workflow_dispatch: + schedule: + - cron: '0 */6 * * *' # Every hour + workflow_dispatch: jobs: cloudflare-api-test: -- 2.45.2 From f36d8077314a7831b5acb0877f22138e73749852 Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Sat, 15 Nov 2025 01:27:32 +0530 Subject: [PATCH 11/11] ISSUE-44: Hithomelabs/HomeLabDocker#44 making tests more verbose --- build.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.gradle b/build.gradle index c85d1f3..0800341 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,11 @@ test { useJUnitPlatform { excludeTags 'integration' } + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + exceptionFormat "full" // shows full stack trace + showStandardStreams = true // shows println/log output + } } tasks.register('integrationTestOnly', Test) { @@ -26,6 +31,11 @@ tasks.register('integrationTestOnly', Test) { } description = 'Runs only integration tests tagged with @Tag("integration")' group = 'verification' + testLogging { + events "passed", "skipped", "failed" + exceptionFormat "full" + showStandardStreams = true + } } repositories { -- 2.45.2