Сделал отдельную команду что бы всё на сервер заливать
This commit is contained in:
AidarKC 2026-02-06 16:47:28 +03:00
parent b5706d3ed5
commit a647091a3f
2 changed files with 29 additions and 1 deletions

View File

@ -119,3 +119,26 @@ tasks.register('itCleanRun', JavaExec) {
dependsOn testClasses dependsOn testClasses
} }
tasks.register('itDeployServer', JavaExec) {
group = "build"
description = "Build → upload to server → clean remote data → restart service → run IT against server"
classpath = sourceSets.test.runtimeClasspath
mainClass = "test.it.IT_DeployRestartAndRunRemoteMain"
// можно переопределить при запуске:
// ./gradlew itDeployServer -Dit.remoteHost=... -Dit.wsUri=...
systemProperty "it.remoteHost", System.getProperty("it.remoteHost", "10.147.20.7")
systemProperty "it.remoteUser", System.getProperty("it.remoteUser", "user")
systemProperty "it.remoteDir", System.getProperty("it.remoteDir", "/home/user/docker/shine-server")
systemProperty "it.remoteDataDir", System.getProperty("it.remoteDataDir", "/home/user/docker/shine-server/data")
systemProperty "it.service", System.getProperty("it.service", "shine-server")
systemProperty "it.localJar", System.getProperty("it.localJar", "build/libs/shine-server.jar")
systemProperty "it.wsUri", System.getProperty("it.wsUri", "wss://shineup.me/ws")
systemProperty "it.login", System.getProperty("it.login", "anya24")
dependsOn testClasses
}

View File

@ -22,7 +22,12 @@ public final class TestConfig {
private TestConfig() {} private TestConfig() {}
public static final String WS_URI = "ws://localhost:7070/ws"; public static final String WS_URI_LOCAL = "ws://localhost:7070/ws";
public static final String WS_URI_Server = "wss://shineup.me/ws";
// по умолчанию LOCAL, но можно переопределить: -Dit.wsUri=...
public static final String WS_URI = System.getProperty("it.wsUri", WS_URI_LOCAL);
public static final long TEST_BCH_LIMIT = 50_000_000L; public static final long TEST_BCH_LIMIT = 50_000_000L;
public static final String TEST_CLIENT_INFO = "it-tests"; public static final String TEST_CLIENT_INFO = "it-tests";