Skip to content
This repository was archived by the owner on Oct 13, 2020. It is now read-only.

Commit dd9352b

Browse files
committed
Update readme
1 parent 93b9e40 commit dd9352b

1 file changed

Lines changed: 20 additions & 13 deletions

File tree

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# ebean-test-config
1+
# ebean-test
22

3-
Plugin that simplifies testing configuration for Ebean. This includes automatically starting docker containers (like Postgres, MySql, SqlServer, Oracle, ElasticSearch, HANA etc).
3+
Plugin that simplifies testing configuration for Ebean. This includes automatically starting docker containers (like Postgres, MySql, SqlServer, Oracle, ElasticSearch, HANA etc).
44
These containers are started and typically setup for testing by creating a database and user ready to run tests against.
55

66
## Prerequisite
77

88
You need docker installed locally.
99

1010
## To use
11-
#### 1) Add ebean-test-config as a test scope dependency
11+
#### 1) Add ebean-test as a test scope dependency
1212

1313
```xml
1414
<dependency>
15-
<groupId>io.ebean.test</groupId>
16-
<artifactId>ebean-test-config</artifactId>
17-
<version>11.15.1</version>
15+
<groupId>io.ebean</groupId>
16+
<artifactId>ebean-test</artifactId>
17+
<version>12.1.1</version>
1818
<scope>test</scope>
1919
</dependency>
2020
```
@@ -26,7 +26,7 @@ Example: Just using H2
2626
```yml
2727
ebean:
2828
test:
29-
platform: h2
29+
platform: h2
3030
```
3131
3232
@@ -37,20 +37,27 @@ ebean:
3737
test:
3838
platform: postgres
3939
dbName: test_myapp
40-
ddlMode: dropCreate # none | dropCreate | create | migration | createOnly | migrationDropCreate
40+
ddlMode: dropCreate # none | dropCreate | migration
4141
```
42-
Note that when we use Postgres, MySql, Sql Server, Oracle, HANA or DB2 we need to specify `dbName`.
42+
Note that when we use Postgres, MySql, Sql Server, Oracle, HANA or DB2 we need to specify `dbName`.
4343
This should be a name that does not clash with other projects that might also test against
4444
the same docker container.
4545

4646

47-
Example: Using SqlServer with databasePlatformName set to sqlserver17.
47+
Example: Using SqlServer with databasePlatformName set to sqlserver17.
4848

4949
```yml
5050
ebean:
51-
dbName: test_ex
51+
databasePlatformName: sqlserver17 ## put here when only using sql server
52+
test:
53+
platform: sqlserver # h2, postgres, mysql, oracle, sqlserver
54+
ddlMode: dropCreate # none | dropCreate | create | migration | createOnly | migrationDropCreate
55+
dbName: test
56+
5257
sqlserver:
53-
databasePlatformName: sqlserver17
58+
databasePlatformName: sqlserver17 ## put here when testing multiple platforms
59+
#collation: SQL_Latin1_General_CP1_CS_AS ## use an explicit collation
60+
#collation: default ## use the sql server default
5461
```
5562

5663

@@ -60,7 +67,7 @@ ebean:
6067

6168
The `db` system property can be set which:
6269
- Sets the default datasource Ebean will use
63-
- If it matches a known container name like `postgres`, `mysql`, `oracle`, `hana` or `sqlserver` then it will start an appropriate docker container to run the tests against.
70+
- If it matches a known container name like `postgres`, `mysql`, `oracle`, `hana` or `sqlserver` then it will start an appropriate docker container to run the tests against.
6471

6572
In this way we can run tests against a specific database platform. e.g.
6673

0 commit comments

Comments
 (0)