Comments (3)
@kuujo
I think implementation of this feature should be straightforward but we should decide what is the best way to define history commands. Here some of my ideas for the history commands. What do you think?
// Get the status of all tests that are finished successfully.
onit history --status --phase="Succeeded"
// Get the status of all "Failed "tests
onit history --status --phase="Failed"
// Get the status of all tests in kube-test namespace (i.e. without filtering on phase)
onit history --status
// Get the status of one specific test
onit history --status -n <Test-pod-name>
// Get logs of a specific test
onit history --logs -n <Test-pod-name>
from onos-test.
There is also going to be a differentiation between test history and benchmark history. Benchmarks and logs are where this becomes a really useful feature.
I think we probably want different commands for different types of output. The output for the history of tests (pass/fail) will be different from the output of the history of benchmarks (throughput/latency) will be different from the logs. I think this is a good reason to have separate commands for each of those outputs to ensure command output format is deterministic (e.g. for parsing).
Thinking about how this could work, the log command will have to take the name of a node for which to output the logs. I think before a namespace is torn down, we should store all its logs in a ConfigMap
keyed by node ID. In order to get the logs, the client has to know which nodes were running for a test (which keys are in the CM), so we’ll need some command to get that information. And we’ll also want a command to download all the logs from a test run.
Finally, I think we should try to stick with the CLI patterns used by kubectl and formalized in that GopherCon talk:
- Use
onit verb noun
- Use flags rather than variadic arguments for optional arguments
So here could be an alternative:
onit get history
onit get test history
onit get benchmark history
onit get test config
onit get benchmark config
onit get test logs --test=x --pod=y
onit get benchmark logs --benchmark=x --pod=y
from onos-test.
@kuujo
Good points. Agreed. I was thinking about get
command but I thought it would be better to make the commands shorter but you are right, we should use onit verb noun
pattern.
from onos-test.
Related Issues (20)
- Document usage of the test setup API for dictating the network architecture in tests
- Support traefik ingress controller for k3d local cluster
- Give More flexiblity in replacting onos subsystems HOT 1
- Using a fixed name for simulators like `devicesim-1` can break `integration-tests` HOT 2
- Avoid Using String in atomix config map HOT 3
- onit v2.0: "onit create cluster" command does not accept a name HOT 2
- onos-cli panic because of no pod HOT 3
- onit install not completing due to error HOT 5
- Provide means of deleting a device via onit cli HOT 2
- Persist test application logs prior to cluster tear down HOT 1
- Document test and benchmark APIs
- Add support for running multiple test iterations
- Make resource requirements configurable
- Detect non-crash errors
- Use slice flags for --suite and --test arguments
- --verbose does not work for onit test command
- onit with no --suite option crashes
- Add authentication import for google cloud HOT 1
- onit --test option with a non-existent test name hangs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onos-test.