mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#2000 - Tests only - bump sql server to 2019-GA-ubuntu-16.04
This commit is contained in:
@@ -7,7 +7,7 @@ public class StartSqlServer {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SqlServerConfig config = new SqlServerConfig("2017-CU4");
|
||||
SqlServerConfig config = new SqlServerConfig("2019-GA-ubuntu-16.04");
|
||||
config.setDbName("test_ebean");
|
||||
config.setUser("test_ebean");
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ public class TestDefaults extends BaseTestCase {
|
||||
assertThat(current).isNotEmpty();
|
||||
if (isMySql()) {
|
||||
assertThat(current.get(0)).contains("insert into defaults_model_draft values (default);");
|
||||
} else if (isSqlServer()) {
|
||||
assertThat(current.get(0)).contains("insert into defaults_model_draft (id) values (?)");
|
||||
} else {
|
||||
assertThat(current.get(0)).contains("insert into defaults_model_draft default values;");
|
||||
}
|
||||
|
||||
@@ -35,12 +35,10 @@ public class TestInheritanceOrderColumn extends BaseTestCase {
|
||||
List<String> sql = LoggedSqlCollector.stop();
|
||||
assertThat(sql).hasSize(5);
|
||||
// Some platforms insert ids and others don't need to...
|
||||
assertSql(sql.get(1))
|
||||
.matches(
|
||||
"txn\\[] insert into ordered_parent \\((id, )?order_master_inheritance_id, dtype, common_name, ordered_aname, sort_order\\).*");
|
||||
assertSql(sql.get(3))
|
||||
.matches(
|
||||
"txn\\[] insert into ordered_parent \\((id, )?order_master_inheritance_id, dtype, common_name, ordered_bname, sort_order\\).*");
|
||||
assertSql(trimId(sql, 1))
|
||||
.contains("insert into ordered_parent (order_master_inheritance_id, dtype, common_name, ordered_aname, sort_order) values");
|
||||
assertSql(trimId(sql, 3))
|
||||
.contains("insert into ordered_parent (order_master_inheritance_id, dtype, common_name, ordered_bname, sort_order) values");
|
||||
|
||||
OrderMasterInheritance result = Ebean.find(OrderMasterInheritance.class).findOne();
|
||||
assertThat(result.getReferenced())
|
||||
@@ -65,4 +63,8 @@ public class TestInheritanceOrderColumn extends BaseTestCase {
|
||||
.containsExactly("commonOrderedB", "commonOrderedA");
|
||||
}
|
||||
|
||||
private String trimId(List<String> sql, int i) {
|
||||
return sql.get(i).replace("(id, ", "(");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user