Skip to content

Commit 45fd270

Browse files
committed
Break down testing instructions
1 parent d0eb7fc commit 45fd270

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,29 @@ Clone the repo and fetch its dependencies:
1919
$ git clone https://github.com/elixir-ecto/ecto_sql.git
2020
$ cd ecto_sql
2121
$ mix deps.get
22-
$ mix test.all
22+
$ mix test
2323

24-
Note that `mix test.all` runs the tests in `test/` and the `integration_test`s for each adapter: `pg`, `myxql` and `tds`.
25-
26-
You can also use a local Ecto checkout if desired:
24+
In case you are modifying Ecto and EctoSQL at the same time, you can configure EctoSQL to use an Ecto version from your machine by running:
2725

2826
$ ECTO_PATH=../ecto mix test.all
2927

30-
You can run tests against a specific Ecto adapter by using the `ECTO_ADAPTER` environment variable:
28+
### Running integration tests
29+
30+
The command above will run unit tests. EctoSQL also has a suite of integration tests for its built-in adapters: `pg`, `myxql` and `tds`. If you are changing logic specific to a database, we recommend running its respective integration test suite as well. Doing so requires you to have the database available locally. MySQL and PostgreSQL can be installed directly on most systems. For MSSQL, you may need to run it as a Docker image:
31+
32+
docker run -d -p 1433:1433 --name mssql -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=some!Password' mcr.microsoft.com/mssql/server:2017-latest
33+
34+
Once the database is running, you can run tests against a specific Ecto adapter by using the `ECTO_ADAPTER` environment variable:
3135

3236
$ ECTO_ADAPTER=pg mix test
3337

34-
MySQL and PostgreSQL can be installed directly on most systems. For MSSQL, you may need to run it as a Docker image:
38+
You may also run `mix test.all` to run the unit tests and all integration tests. You can also use a local Ecto checkout if desired:
3539

36-
docker run -d -p 1433:1433 --name mssql -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=some!Password' mcr.microsoft.com/mssql/server:2017-latest
40+
$ ECTO_PATH=../ecto mix test.all
3741

3842
### Running containerized tests
3943

40-
It is also possible to run the integration tests under a containerized environment using [earthly](https://earthly.dev/get-earthly):
44+
It is also possible to run the integration tests under a containerized environment using [earthly](https://earthly.dev/get-earthly). You will also need Docker installed on your system. Then you can run:
4145

4246
$ earthly -P +all
4347

lib/ecto/adapters/postgres.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ defmodule Ecto.Adapters.Postgres do
9494
* `:lc_collate` - the collation order
9595
* `:lc_ctype` - the character classification
9696
* `:dump_path` - where to place dumped structures
97-
* `dump_prefixes` - list of prefixes that will be included in the structure dump.
97+
* `:dump_prefixes` - list of prefixes that will be included in the structure dump.
9898
When specified, the prefixes will have their definitions dumped along with the
9999
data in their migration table. When it is not specified, the configured
100100
database has the definitions dumped from all of its schemas but only

0 commit comments

Comments
 (0)