@@ -58,10 +58,10 @@ const testPaths = {
58
58
59
59
function startParameterTest ( options , testpath , suiteName ) {
60
60
let count = 0 ;
61
- let results = { shutdown : true } ;
61
+ let results = { shutdown : true } ;
62
62
let filtered = { } ;
63
63
const tests = tu . scanTestPaths ( testpath , options ) ;
64
-
64
+ global . testOptions = options ;
65
65
tests . forEach ( function ( testFile , i ) {
66
66
count += 1 ;
67
67
if ( tu . filterTestcaseByOptions ( testFile , options , filtered ) ) {
@@ -88,7 +88,8 @@ function startParameterTest(options, testpath, suiteName) {
88
88
print ( paramsFirstRun ) ;
89
89
}
90
90
instanceInfo = pu . startInstance ( options . protocol , options , paramsFirstRun , suiteName , rootDir ) ; // first start
91
- pu . cleanupDBDirectoriesAppend ( instanceInfo . rootDir ) ;
91
+ global . instanceInfoGlobal = instanceInfo ;
92
+ pu . cleanupDBDirectoriesAppend ( instanceInfo . rootDir ) ;
92
93
try {
93
94
print ( BLUE + '================================================================================' + RESET ) ;
94
95
print ( CYAN + 'Running Setup of: ' + testFile + RESET ) ;
@@ -109,15 +110,14 @@ function startParameterTest(options, testpath, suiteName) {
109
110
return ;
110
111
}
111
112
if ( pu . shutdownInstance ( instanceInfo , clonedOpts , false ) ) { // stop
112
- instanceInfo . arangods . forEach ( function ( arangod ) {
113
+ instanceInfo . arangods . forEach ( function ( arangod ) {
113
114
arangod . pid = null ;
114
115
} ) ;
115
116
if ( options . extremeVerbosity ) {
116
117
print ( paramsSecondRun ) ;
117
118
}
118
119
pu . reStartInstance ( clonedOpts , instanceInfo , paramsSecondRun ) ; // restart with restricted permissions
119
- }
120
- else {
120
+ } else {
121
121
results [ testFile ] = {
122
122
status : false ,
123
123
message : "failed to stop instance" ,
@@ -127,17 +127,17 @@ function startParameterTest(options, testpath, suiteName) {
127
127
} else {
128
128
instanceInfo = pu . startInstance ( options . protocol , options , paramsSecondRun , suiteName , rootDir ) ; // one start
129
129
}
130
+ global . instanceInfoGlobal = instanceInfo ;
130
131
131
132
results [ testFile ] = tu . runInLocalArangosh ( options , instanceInfo , testFile , { } ) ;
132
133
shutdownStatus = pu . shutdownInstance ( instanceInfo , clonedOpts , false ) ;
133
134
134
135
results [ 'shutdown' ] = results [ 'shutdown' ] && shutdownStatus ;
135
-
136
+
136
137
if ( ! results [ testFile ] . status || ! shutdownStatus ) {
137
138
print ( "Not cleaning up " + instanceInfo . rootDir ) ;
138
139
results . status = false ;
139
- }
140
- else {
140
+ } else {
141
141
pu . cleanupLastDirectory ( options ) ;
142
142
}
143
143
} else {
@@ -204,5 +204,7 @@ exports.setup = function (testFns, defaultFns, opts, fnDocs, optionsDoc, allTest
204
204
testFns [ 'server_parameters' ] = server_parameters ;
205
205
testFns [ 'server_secrets' ] = server_secrets ;
206
206
207
- for ( var attrname in functionsDocumentation ) { fnDocs [ attrname ] = functionsDocumentation [ attrname ] ; }
207
+ for ( var attrname in functionsDocumentation ) {
208
+ fnDocs [ attrname ] = functionsDocumentation [ attrname ] ;
209
+ }
208
210
} ;
0 commit comments