Merge branch 'tibor' into 'master'

API 1.0.43 split_tests source

See merge request bossanyit/aitrainer_server!65
This commit is contained in:
Bossányi Tibor 2021-06-04 12:56:58 +00:00
commit a5ae05907b
7 changed files with 17 additions and 5 deletions

View File

@ -11,7 +11,7 @@ plugins {
} }
group = "com.aitrainer" group = "com.aitrainer"
version = "1.0.42" version = "1.0.43"
java.sourceCompatibility = JavaVersion.VERSION_1_8 java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories { 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) @ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "customerTrainingPlanId", nullable = false) @JoinColumn(name = "customerTrainingPlanId", nullable = false)
@JsonIgnore @JsonIgnore
val customerTrainingPlan: CustomerTrainingPlan? = null var customerTrainingPlan: CustomerTrainingPlan? = null
} }

View File

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

View File

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

View File

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

View File

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