API 1.0.43 split_tests source

This commit is contained in:
Bossanyi Tibor 2021-06-04 14:55:31 +02:00
parent 115936c4af
commit a1cec1f7b5
7 changed files with 17 additions and 5 deletions

View File

@ -11,7 +11,7 @@ plugins {
}
group = "com.aitrainer"
version = "1.0.42"
version = "1.0.43"
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {

View File

@ -0,0 +1,8 @@
START TRANSACTION;
ALTER TABLE `split_tests`
ADD COLUMN `source` CHAR(250) NULL DEFAULT NULL AFTER `test_value`;
UPDATE configuration set config_value = "1.0.43", date_change=CURRENT_DATE WHERE config_key = "db_version";
COMMIT;

View File

@ -21,5 +21,5 @@ data class CustomerTrainingPlanDetails (
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "customerTrainingPlanId", nullable = false)
@JsonIgnore
val customerTrainingPlan: CustomerTrainingPlan? = null
var customerTrainingPlan: CustomerTrainingPlan? = null
}

View File

@ -15,6 +15,7 @@ data class SplitTests (
@Expose var remoteConfigKey: String?,
@Expose var remoteConfigValue: String?,
@Expose @get: NotBlank var testValue: String = "",
@Expose var source: String?,
@Expose @get: NotBlank var active: Boolean = false,
@Expose var validTo: String?,
)

View File

@ -17,6 +17,6 @@ logging.config=classpath:logback-spring.xml
logging.file=logs
# if the database structure has been changed, increment this version number
application.version=1.0.42
application.version=1.0.43
jwt.secret=aitrainer

View File

@ -17,7 +17,7 @@ logging.config=classpath:logback-spring.xml
logging.file=logs
# if the database structure has been changed, increment this version number
application.version=1.0.42
application.version=1.0.43
jwt.secret=aitrainer
jasypt.encryptor.password=Tibor

View File

@ -183,9 +183,12 @@ class AppPackageTest {
val splitTestJson: String = record[1]
val type = object : TypeToken<List<SplitTests?>?>() {}.type
val tests: List<SplitTests> = gson.fromJson(splitTestJson, type)
assertEquals(tests.size,2)
assertEquals(tests.size,3)
assertEquals(tests[1].name, "registration_skip")
assertEquals(tests[1].testValue, "Colors.cyan")
assertEquals(tests[2].name, "sales_text")
assertEquals(tests[2].testValue, "")
assertEquals(tests[2].source, "description.name")
}
}
}