Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blendb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
C3SL
blendb
Commits
7d18c3dd
Commit
7d18c3dd
authored
6 years ago
by
Lucas Fernandes de Oliveira
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue/98' into 'develop'
Issue
#98
: Add verification to env variable See merge request
!83
parents
a3bf602b
d1a0963a
Branches
Branches containing commit
No related tags found
1 merge request
!83
Issue #98: Add verification to env variable
Pipeline
#19108
passed
6 years ago
Stage: test
Stage: build
Stage: deploy
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
scripts/loadTest.ts
+8
-1
8 additions, 1 deletion
scripts/loadTest.ts
src/api/controllers/collect.spec.ts
+9
-2
9 additions, 2 deletions
src/api/controllers/collect.spec.ts
src/main.ts
+10
-1
10 additions, 1 deletion
src/main.ts
test/scenario.ts
+9
-1
9 additions, 1 deletion
test/scenario.ts
with
36 additions
and
5 deletions
scripts/loadTest.ts
+
8
−
1
View file @
7d18c3dd
...
@@ -27,7 +27,14 @@ import { ConfigParser } from "../src/util/configParser";
...
@@ -27,7 +27,14 @@ import { ConfigParser } from "../src/util/configParser";
let
config
:
any
;
let
config
:
any
;
let
fixture
;
let
fixture
;
const
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
let
configPath
;
if
(
process
.
env
.
BLENDB_SCHEMA_FILE
){
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
}
else
{
throw
new
Error
(
"
BLENDB_SCHEMA_FILE wasn't informed
"
);
}
config
=
ConfigParser
.
parse
(
configPath
);
config
=
ConfigParser
.
parse
(
configPath
);
fixture
=
new
FixPostgres
(
config
.
connection
);
fixture
=
new
FixPostgres
(
config
.
connection
);
...
...
This diff is collapsed.
Click to expand it.
src/api/controllers/collect.spec.ts
+
9
−
2
View file @
7d18c3dd
...
@@ -73,7 +73,14 @@ describe("API collect controller", () => {
...
@@ -73,7 +73,14 @@ describe("API collect controller", () => {
// Initializing
// Initializing
before
(
function
(
done
):
void
{
before
(
function
(
done
):
void
{
// Arrow function not used to get acces to this and skip the test
// Arrow function not used to get acces to this and skip the test
const
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
let
configPath
;
if
(
process
.
env
.
BLENDB_SCHEMA_FILE
){
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
}
else
{
throw
new
Error
(
"
BLENDB_SCHEMA_FILE wasn't informed
"
);
}
config
=
ConfigParser
.
parse
(
configPath
);
config
=
ConfigParser
.
parse
(
configPath
);
eachOf
(
config
.
adapters
,
function
(
database
,
key
:
number
,
callback
)
{
eachOf
(
config
.
adapters
,
function
(
database
,
key
:
number
,
callback
)
{
...
...
This diff is collapsed.
Click to expand it.
src/main.ts
+
10
−
1
View file @
7d18c3dd
...
@@ -36,8 +36,17 @@ const app = module.exports = express();
...
@@ -36,8 +36,17 @@ const app = module.exports = express();
// Load configuration file
// Load configuration file
import
{
ConfigParser
}
from
"
./util/configParser
"
;
import
{
ConfigParser
}
from
"
./util/configParser
"
;
let
configPath
;
/** @hidden */
/** @hidden */
const
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
if
(
process
.
env
.
BLENDB_SCHEMA_FILE
){
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
}
else
{
throw
new
Error
(
"
BLENDB_SCHEMA_FILE wasn't informed
"
);
}
/** @hidden */
/** @hidden */
const
config
=
ConfigParser
.
parse
(
configPath
);
const
config
=
ConfigParser
.
parse
(
configPath
);
...
...
This diff is collapsed.
Click to expand it.
test/scenario.ts
+
9
−
1
View file @
7d18c3dd
...
@@ -29,7 +29,15 @@ import { ViewHandler } from "../src/util/viewHandler";
...
@@ -29,7 +29,15 @@ import { ViewHandler } from "../src/util/viewHandler";
import
{
EngineScenario
,
AdapterScenario
,
DataCtrlScenario
}
from
"
../src/util/scenarioHandler
"
;
import
{
EngineScenario
,
AdapterScenario
,
DataCtrlScenario
}
from
"
../src/util/scenarioHandler
"
;
import
{
Query
,
QueryOpts
}
from
"
../src/common/query
"
;
import
{
Query
,
QueryOpts
}
from
"
../src/common/query
"
;
const
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
let
configPath
;
if
(
process
.
env
.
BLENDB_SCHEMA_FILE
){
configPath
=
process
.
env
.
BLENDB_SCHEMA_FILE
;
}
else
{
throw
new
Error
(
"
BLENDB_SCHEMA_FILE wasn't informed
"
);
}
const
config
=
ConfigParser
.
parse
(
configPath
);
const
config
=
ConfigParser
.
parse
(
configPath
);
const
mets
:
{[
key
:
string
]:
Metric
}
=
{};
const
mets
:
{[
key
:
string
]:
Metric
}
=
{};
...
...
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