Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
blendb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
C3SL
blendb
Commits
ba277989
Commit
ba277989
authored
Aug 29, 2018
by
Lucas Fernandes de Oliveira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue/86' into 'develop'
Issue
#86
: Add environment variable for yaml files See merge request
!74
parents
87ba0061
234cb7ee
Pipeline
#17436
passed with stages
in 1 minute and 16 seconds
Changes
8
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
6 deletions
+10
-6
.gitlab-ci.yml
.gitlab-ci.yml
+0
-2
config/ci_monet_test.env.example
config/ci_monet_test.env.example
+1
-0
config/ci_postgres_test.env.example
config/ci_postgres_test.env.example
+1
-0
config/config.env.example
config/config.env.example
+1
-0
src/adapter/postgres.spec.ts
src/adapter/postgres.spec.ts
+2
-1
src/api/controllers/collect.spec.ts
src/api/controllers/collect.spec.ts
+2
-1
src/main.ts
src/main.ts
+1
-1
test/scenario.ts
test/scenario.ts
+2
-1
No files found.
.gitlab-ci.yml
View file @
ba277989
...
...
@@ -28,7 +28,6 @@ run_test_postgres:
stage
:
test
script
:
-
yarn install --frozen-lockfile --silent --non-interactive
-
mv config/ci_test.yaml.example config/test.yaml
-
mv config/ci_postgres_test.env.example config/test.env
-
yarn test
-
yarn run lint
...
...
@@ -40,7 +39,6 @@ run_test_monet:
stage
:
test
script
:
-
yarn install --frozen-lockfile --silent --non-interactive
-
mv config/ci_test.yaml.example config/test.yaml
-
mv config/ci_monet_test.env.example config/test.env
-
yarn test
-
yarn run lint
...
...
config/ci_monet_test.env.example
View file @
ba277989
...
...
@@ -4,4 +4,5 @@ BLENDB_DB_PASSWORD=monetdb
BLENDB_DB_HOST=monet
BLENDB_DB_PORT=50000
BLENDB_ADAPTER=monet
BLENDB_SCHEMA_FILE=config/ci_test.yaml.example
PORT=3000
config/ci_postgres_test.env.example
View file @
ba277989
...
...
@@ -4,4 +4,5 @@ BLENDB_DB_PASSWORD=
BLENDB_DB_HOST=postgres
BLENDB_DB_PORT=5432
BLENDB_ADAPTER=postgres
BLENDB_SCHEMA_FILE=config/ci_test.yaml.example
PORT=3000
config/config.env.example
View file @
ba277989
...
...
@@ -4,4 +4,5 @@ BLENDB_DB_PASSWORD=secret
BLENDB_DB_HOST=localhost
BLENDB_DB_PORT=5432
BLENDB_ADAPTER=postgres
BLENDB_SCHEMA_FILE=config/config.yaml
PORT=3000
src/adapter/postgres.spec.ts
View file @
ba277989
...
...
@@ -36,7 +36,8 @@ describe("Sql adapter", () => {
let
fixture
;
before
(
function
(
done
):
void
{
// Arrow function not used to get acces to this and skip the test
config
=
ConfigParser
.
parse
(
"
config/test.yaml
"
);
const
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
config
=
ConfigParser
.
parse
(
configPath
);
if
(
config
.
adapter
===
"
postgres
"
)
{
fixture
=
new
FixPostgres
(
config
.
connection
);
...
...
src/api/controllers/collect.spec.ts
View file @
ba277989
...
...
@@ -36,7 +36,8 @@ describe("API collect controller", () => {
let
fixture
;
before
(
function
(
done
):
void
{
// Arrow function not used to get acces to this and skip the test
config
=
ConfigParser
.
parse
(
"
config/test.yaml
"
);
const
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
config
=
ConfigParser
.
parse
(
configPath
);
if
(
config
.
adapter
===
"
postgres
"
)
{
fixture
=
new
FixPostgres
(
config
.
connection
);
fixture
.
loadSource
(
config
.
sources
,
(
err
)
=>
{
...
...
src/main.ts
View file @
ba277989
...
...
@@ -37,7 +37,7 @@ const app = module.exports = express();
import
{
ConfigParser
}
from
"
./util/configParser
"
;
/** @hidden */
const
configPath
=
(
app
.
get
(
"
env
"
)
===
"
test
"
)
?
"
config/test.yaml
"
:
"
config/config.yaml
"
;
const
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
/** @hidden */
const
config
=
ConfigParser
.
parse
(
configPath
);
...
...
test/scenario.ts
View file @
ba277989
...
...
@@ -66,7 +66,8 @@ interface DataCtrlScenario {
clausal
:
Query
;
}
const
config
=
ConfigParser
.
parse
(
"
config/test.yaml
"
);
const
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
const
config
=
ConfigParser
.
parse
(
configPath
);
const
mets
=
config
.
metrics
.
sort
((
a
,
b
)
=>
{
const
aValue
=
parseInt
(
a
.
name
.
split
(
"
:
"
)[
1
],
10
);
...
...
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