-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Babatunde Sanusi <[email protected]>
- Loading branch information
Showing
1 changed file
with
139 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const sinon = require('sinon'); | ||
const chai = require('chai'); | ||
const expect = chai.expect; | ||
|
||
describe('CaliperEngine', function() { | ||
|
||
describe('Initialization', function() { | ||
it('should initialize with given configurations and adapter factory', function() { | ||
// TODO: Implement test | ||
}); | ||
|
||
it('should set the workspace and initial return code', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
describe('Run Method Execution Flow', function() { | ||
|
||
context('When start commands are to be executed', function() { | ||
it('should execute the start command successfully', function() { | ||
// TODO: Implement test | ||
}); | ||
|
||
it('should handle errors during start command execution', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
context('When start commands are to be skipped', function() { | ||
it('should skip executing the start command', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
context('When initialization phase is to be performed', function() { | ||
it('should initialize the network connector successfully', function() { | ||
// TODO: Implement test | ||
}); | ||
|
||
it('should handle errors during network initialization', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
context('When initialization phase is to be skipped', function() { | ||
it('should skip the network initialization phase', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
context('When smart contract installation is to be performed', function() { | ||
it('should install the smart contract successfully', function() { | ||
// TODO: Implement test | ||
}); | ||
|
||
it('should handle errors during smart contract installation', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
context('When smart contract installation is to be skipped', function() { | ||
it('should skip the smart contract installation phase', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
context('When test phase is to be performed', function() { | ||
it('should execute test rounds using the round orchestrator', function() { | ||
// TODO: Implement test | ||
}); | ||
|
||
it('should handle errors during the test phase execution', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
context('When test phase is to be skipped', function() { | ||
it('should skip the test phase execution', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
context('When an error occurs during run execution', function() { | ||
it('should catch and log the error, setting an appropriate return code', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
context('When end commands are to be executed', function() { | ||
it('should execute the end command successfully', function() { | ||
// TODO: Implement test | ||
}); | ||
|
||
it('should handle errors during end command execution', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
context('When end commands are to be skipped', function() { | ||
it('should skip executing the end command', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
it('should set the return code to 0 if no errors occurred during run', function() { | ||
// TODO: Implement test | ||
}); | ||
|
||
it('should return the appropriate return code after execution', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
|
||
describe('Stop Method Functionality', function() { | ||
it('should stop the round orchestrator if it is running', function() { | ||
// TODO: Implement test | ||
}); | ||
|
||
it('should handle cases where the round orchestrator is not running', function() { | ||
// TODO: Implement test | ||
}); | ||
}); | ||
}); |