apache / apache/openwhisk-wskdeploy
Unit Test - servicedeployer.go
- Dominant language
- Go
- Stars
- 75
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
Add unit tests to validate methods under deployers package which are defined in [servicedeployer.go](https://github.com/apache/incubator-openwhisk-wskdeploy/blob/master/deployers/servicedeployer.go).
All unit tests should go in servicedeployer_test.go under [deployers/](https://github.com/apache/incubator-openwhisk-wskdeploy/blob/master/deployers)
```
// check to validate manifest and deployment files are valid and could be parsed
func (deployer *ServiceDeployer) Check() {
...
}
// parse manifest and deployment files and determine the openwhisk entities involved to deploy
func (deployer *ServiceDeployer) ConstructDeploymentPlan() error {
...
}
// parse manifest and deployment files and determine the openwhisk entities involved to undeploy
func (deployer *ServiceDeployer) ConstructUnDeploymentPlan() (*DeploymentApplication, error) {
...
}
// deploy all the entities specified in manifest and deployment file
// its not trivial to create unit tests for this method, try to figure out if we can create some kind of mock
// else we can move this under integration testing
func (deployer *ServiceDeployer) Deploy() error {
...
}
// deploy entities specified in manifest and deployment file
// similar to Deploy method, we can move this under integration testing if needed
func (deployer *ServiceDeployer) UnDeploy(verifiedPlan *DeploymentApplication) error {
...
}
```
Contributor guide
Assessment
This issue has not been assessed yet.