Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
cbcb1f61
Unverified
Commit
cbcb1f61
authored
Nov 20, 2018
by
Stephan Renatus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev-integration-tests: update database steps (just use docker)
Signed-off-by:
Stephan Renatus
<
srenatus@chef.io
>
parent
1d0568ef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
25 deletions
+14
-25
dev-integration-tests.md
Documentation/dev-integration-tests.md
+14
-25
No files found.
Documentation/dev-integration-tests.md
View file @
cbcb1f61
...
@@ -18,39 +18,28 @@ $ ./scripts/test-k8s.sh
...
@@ -18,39 +18,28 @@ $ ./scripts/test-k8s.sh
## Postgres
## Postgres
Running database tests locally require:
Running database tests locally require
s
:
*
A systemd based Linux distro.
*
Docker
*
A recent version of
[
rkt
](
https://github.com/coreos/rkt
)
installed.
T
he
`standup.sh`
script in the SQL directory is used to run databases in containers with systemd daemonizing the process.
T
o run the database integration tests:
```
-
start a postgres container:
$ sudo ./storage/sql/standup.sh create postgres
Starting postgres. To view progress run
journalctl -fu dex-postgres
Running as unit dex-postgres.service.
`docker run --name dex-postgres -e POSTGRES_USER=postgres -e POSTGRES_DB=dex -p 5432:5432 -d postgres:11`
To run tests export the following
environment variables:
-
export the required
environment variables:
export DEX_POSTGRES_DATABASE=postgres; export DEX_POSTGRES_USER=postgres; export DEX_POSTGRES_PASSWORD=postgres; export DEX_POSTGRES_HOST=172.16.28.3:5432
`export DEX_POSTGRES_DATABASE=dex DEX_POSTGRES_USER=postgres DEX_POSTGRES_PASSWORD=postgres DEX_POSTGRES_HOST=127.0.0.1:5432`
```
-
run the storage/sql tests:
Exporting the variables will cause the database tests to be run, rather than skipped.
```
$ # sqlite3 takes forever to compile, be sure to install test dependencies
$ go test -v -i ./storage/sql
$ go test -v ./storage/sql
```
```
- clean up the postgres container: `docker rm -f dex-postgres`
$ # sqlite3 takes forever to compile, be sure to install test dependencies
$ go test -v -i ./storage/sql
$ go test -v ./storage/sql
```
When you're done, tear down the unit using the
`standup.sh`
script.
```
$ sudo ./storage/sql/standup.sh destroy postgres
```
## LDAP
## LDAP
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment