This repository was archived by the owner on Sep 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +302
-320
lines changed
Expand file tree Collapse file tree 4 files changed +302
-320
lines changed Original file line number Diff line number Diff line change 55sudo : required
66dist : trusty
77before_install :
8- - scripts/install_dgraph.sh
8+ - scripts/install_dgraph.sh
99script :
10- - scripts/build.sh
10+ - scripts/build.sh
1111after_success : npm run coveralls
Original file line number Diff line number Diff line change @@ -14,11 +14,8 @@ function quit {
1414
1515 if pgrep -x dgraph > /dev/null
1616 then
17- while pgrep dgraph;
18- do
19- echo " Sleeping for 5 secs so that Dgraph can shutdown."
20- sleep 5
21- done
17+ echo " Sleeping for 5 secs so that Dgraph can shutdown."
18+ sleep 5
2219 fi
2320
2421 echo " Clean shutdown done."
@@ -27,7 +24,8 @@ function quit {
2724
2825function start {
2926 echo -e " Starting Dgraph alpha."
30- dgraph alpha --acl_secret_file ./scripts/hmac-secret -p data/p -w data/w --lru_mb 4096 --zero localhost:5080 > data/alpha.log 2>&1 &
27+ head -c 1024 /dev/random > data/acl-secret.txt
28+ dgraph alpha -p data/p -w data/w --lru_mb 4096 --zero localhost:5080 --acl_secret_file data/acl-secret.txt > data/server.log 2>&1 &
3129 # Wait for membership sync to happen.
3230 sleep $sleepTime
3331 return 0
Original file line number Diff line number Diff line change @@ -91,11 +91,10 @@ export class DgraphClientStub {
9191 }
9292
9393 public query ( req : Request ) : Promise < Response > {
94- /* tslint:disable-next-line */
95- const headers = Object . assign (
96- { } ,
97- this . options . headers !== undefined ? this . options . headers : { } ,
98- ) ;
94+ const headers =
95+ this . options . headers !== undefined
96+ ? { ...this . options . headers }
97+ : { } ;
9998 if ( req . vars !== undefined ) {
10099 if ( this . legacyApi ) {
101100 headers [ "X-Dgraph-Vars" ] = JSON . stringify ( req . vars ) ;
@@ -227,14 +226,11 @@ export class DgraphClientStub {
227226 } else {
228227 return Promise . reject ( "Mutation has no data" ) ;
229228 }
230- /* tslint:disable-next-line */
231- const headers = Object . assign (
232- { } ,
233- this . options . headers !== undefined ? this . options . headers : { } ,
234- {
235- "Content-Type" : `application/${ usingJSON ? "json" : "rdf" } ` ,
236- } ,
237- ) ;
229+
230+ const headers = {
231+ ...( this . options . headers !== undefined ? this . options . headers : { } ) ,
232+ "Content-Type" : `application/${ usingJSON ? "json" : "rdf" } ` ,
233+ } ;
238234
239235 if ( usingJSON && this . legacyApi ) {
240236 headers [ "X-Dgraph-MutationType" ] = "json" ;
You can’t perform that action at this time.
0 commit comments