Compare commits

...

2 Commits

4 changed files with 14 additions and 4 deletions

View File

@ -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"
run: ./gradlew integrationTestOnly

View File

@ -15,6 +15,17 @@ java {
test {
systemProperty 'spring.profiles.active', 'test'
useJUnitPlatform {
excludeTags 'integration'
}
}
tasks.register('integrationTestOnly', Test) {
useJUnitPlatform {
includeTags 'integration'
}
description = 'Runs only integration tests tagged with @Tag("integration")'
group = 'verification'
}
repositories {

View File

@ -1 +0,0 @@
rootProject.name = 'CFTunnels'

View File

@ -4,11 +4,11 @@ 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;
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;
@ -23,7 +23,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