houshengbo commented on issue #2430: Reimplementation of Wsk.scala for test
Currently we only have Wsk as for CLI implementation, and Wsk entities based
on issuing CLI commands, in order to access openwhisk services for tests. We
are targeting to implement WskRest for REST, and Wsk REST entities based on
making REST calls to access openwhisk services for tests as well.
This piece of work can be designed to implement in the following steps:
1. Make the final result for all the test cases consistent.
-- We use RunResult to save the information from CLI, in terms of exitCode,
stdout and stderr. We need to have RestResult to save the information coming
back from http response. Http status code can be converted into exitCode (by
minus 256 if it is greater than 400, otherwise keep the same), http resposne
data can be converted into stdout, http error message can be mapped into stderr
if there is error.
-- Result of activation CliActivation need to be generalized. We need to
make it accessible by class in packages, not just an inner class. In addition,
we need to give a general name, like ActivationResult. Activation information
from http should also be converted into this object. PR: #2592
2. Create base Wsk class and base entities for Wsk CLI and REST to extend or
create. All the test cases are now using Wsk and Wsk entities of CLI by
default. We need to switch to use Base Wsk and Base entities, so that test
cases can call the implementation of either Wsk CLI or REST based on different
needs. Wsk class and base entities are defined as traits with the methods. Wsk
and Wsk entities of CLI and REST need to override the methods with different
implementation. PR: #2593
3. When the base Wsk class and base entities are in hand, implement Wsk REST
and wsk rest entities.
-- Create WskRest framework
-- Add WskRestAction
-- Add WskRestTrigger
-- Add WskRestNamespace
-- Add WskRestRule
-- Add WskRestPackage
-- Add WskRestApi
-- Add WskRestActivation
4. Create abstract class for test cases, and create different wsk with
either cli or rest. Test result verification may remain the same for most of
cases, may need slight changes for some verification.
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
Apache Git Services