-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI tool subcommand to show failed test cases from a claim file. (#1249)
* Normalize folders structure & minor refactors. Moved every command and subcommand to separate folders. Also, removed the "build-catalog-json:" target from the Makefile as that subcommand (generate catalog json) doesn't exist since long ago. * CLI tool subcommand to show failed test cases from a claim file. Added a new subcommand to the tnf cli tool that parses a claim file and shows the failed test cases in a more readable way. By default, the output is plain text, but a 'json' output mode can be selected in order to get a json representation of those failed test cases per test suite. Also, the subcommand has a flag --testsuites that can be used to reduce the output to the tests suites included in the comma separated list. Examples: 1. Show all the failed test cases from all test suites: ./tnf claim show failures --claim path/to/claim.json 2. Show all the failed test cases from all tests suites in json output. ./tnf claim show failures --claim path/to/claim.json --output json 3. Show all the failed test cases from the lifecycle and access-control suites. ./tnf claim show failures --claim path/to/claim.json --testsuites "lifecycle,access-control" * Adressing initial comments from Brandon. * Added another error log trace.
- Loading branch information
Showing
18 changed files
with
575 additions
and
115 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
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
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
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,23 @@ | ||
package claim | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
"github.com/test-network-function/cnf-certification-test/cmd/tnf/claim/add" | ||
"github.com/test-network-function/cnf-certification-test/cmd/tnf/claim/compare" | ||
"github.com/test-network-function/cnf-certification-test/cmd/tnf/claim/show" | ||
) | ||
|
||
var ( | ||
claimCommand = &cobra.Command{ | ||
Use: "claim", | ||
Short: "Help tools for working with claim files.", | ||
} | ||
) | ||
|
||
func NewCommand() *cobra.Command { | ||
claimCommand.AddCommand(add.NewCommand()) | ||
claimCommand.AddCommand(compare.NewCommand()) | ||
claimCommand.AddCommand(show.NewCommand()) | ||
|
||
return claimCommand | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
Oops, something went wrong.