Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
dex
Commits
cbcb1f61
Unverified
Commit
cbcb1f61
authored
6 years ago
by
Stephan Renatus
Browse files
Options
Downloads
Patches
Plain Diff
dev-integration-tests: update database steps (just use docker)
Signed-off-by:
Stephan Renatus
<
srenatus@chef.io
>
parent
1d0568ef
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Documentation/dev-integration-tests.md
+14
-25
14 additions, 25 deletions
Documentation/dev-integration-tests.md
with
14 additions
and
25 deletions
Documentation/dev-integration-tests.md
+
14
−
25
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 t
o run database
s
in
containers with systemd daemonizing the process.
To run
the
database in
tegration 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=1
72.16.28.3
:5432
`
export DEX_POSTGRES_DATABASE=
dex
DEX_POSTGRES_USER=postgres DEX_POSTGRES_PASSWORD=postgres DEX_POSTGRES_HOST=1
27.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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment