-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migate tests to fit new Postgres system
- Loading branch information
Showing
36 changed files
with
7,565 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
CREATE DATABASE router_test; | ||
\connect router_test; | ||
|
||
CREATE TABLE backends ( | ||
id SERIAL PRIMARY KEY, | ||
backend_id VARCHAR, | ||
backend_url VARCHAR, | ||
created_at TIMESTAMP NOT NULL, | ||
updated_at TIMESTAMP NOT NULL | ||
); | ||
CREATE UNIQUE INDEX index_backends_on_backend_id ON backends (backend_id); | ||
|
||
CREATE TABLE routes ( | ||
id SERIAL PRIMARY KEY, | ||
incoming_path VARCHAR, | ||
route_type VARCHAR, | ||
handler VARCHAR, | ||
disabled BOOLEAN DEFAULT false, | ||
backend_id VARCHAR, | ||
redirect_to VARCHAR, | ||
redirect_type VARCHAR, | ||
segments_mode VARCHAR, | ||
created_at TIMESTAMP NOT NULL, | ||
updated_at TIMESTAMP NOT NULL | ||
); | ||
CREATE UNIQUE INDEX index_routes_on_incoming_path ON routes (incoming_path); | ||
|
||
CREATE TABLE users ( | ||
id SERIAL PRIMARY KEY, | ||
name VARCHAR, | ||
email VARCHAR, | ||
uid VARCHAR, | ||
organisation_slug VARCHAR, | ||
organisation_content_id VARCHAR, | ||
app_name VARCHAR, | ||
permissions TEXT, | ||
remotely_signed_out BOOLEAN DEFAULT false, | ||
disabled BOOLEAN DEFAULT false, | ||
created_at TIMESTAMP NOT NULL, | ||
updated_at TIMESTAMP NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ Usage: %s [-version] | |
The following environment variables and defaults are available: | ||
ROUTER_PUBADDR=:8080 Address on which to serve public requests | ||
ROUTER_APIADDR=:8081 Address on which to receive reload requests | ||
ROUTER_PUBADDR=:5434 Address on which to serve public requests | ||
ROUTER_APIADDR=:5433 Address on which to receive reload requests | ||
ROUTER_MONGO_URL=127.0.0.1 Address of mongo cluster (e.g. 'mongo1,mongo2,mongo3') | ||
ROUTER_MONGO_DB=router Name of mongo database to use | ||
ROUTER_MONGO_POLL_INTERVAL=2s Interval to poll mongo for route changes | ||
|
@@ -87,7 +87,7 @@ func main() { | |
var ( | ||
pubAddr = getenv("ROUTER_PUBADDR", ":8080") | ||
apiAddr = getenv("ROUTER_APIADDR", ":8081") | ||
databaseURL = getenv("DATABASE_URL", "postgresql://[email protected]:27017/router?sslmode=disable") | ||
databaseURL = getenv("DATABASE_URL", "postgresql://[email protected]:5432/router_test?sslmode=disable") | ||
databaseName = getenv("DATABASE_NAME", "router") | ||
dbPollInterval = getenv("ROUTER_POLL_INTERVAL", "2s") | ||
errorLogFile = getenv("ROUTER_ERROR_LOG", "STDERR") | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.