cleanup tests

This commit is contained in:
[[ BOT ]] Lynn Cyrin 2019-08-22 21:29:33 -07:00
parent 6e8917398c
commit 74cd3bc3fe
No known key found for this signature in database
GPG Key ID: 4E7214CB460A2400

View File

@ -1187,37 +1187,22 @@ func TestRequiredFlagAppRunBehavior(t *testing.T) {
} }
} }
// func TestAppRunPassThroughRegression(t *testing.T) { func TestRegression(t *testing.T) {
// tdata := []struct { // setup
// testCase string app := NewApp()
// appRunInput []string app.Commands = []Command{{
// appCommands []Command Name: "myCommand",
// }{ Flags: []Flag{StringFlag{Name: "someFlag"}},
// { }}
// testCase: "test_case",
// appRunInput: []string{"myCLI", "myCommand", "--someFlag", "someInput", "docker", "run", "--rm", "ubuntu", "bash"},
// appCommands: []Command{{
// Name: "myCommand",
// Flags: []Flag{StringFlag{Name: "someFlag"}},
// }},
// },
// }
// for _, test := range tdata {
// t.Run(test.testCase, func(t *testing.T) {
// // setup
// app := NewApp()
// app.Commands = test.appCommands
// // logic under test // logic under test
// err := app.Run(test.appRunInput) err := app.Run([]string{"myCLI", "myCommand", "--someFlag", "someInput", "docker", "run", "--rm", "ubuntu", "bash"})
// // assertions // assertions
// if err != nil { if err != nil {
// t.Errorf("did not expected an error, but there was one: %s", err) t.Errorf("did not expected an error, but there was one: %s", err)
// } }
// }) }
// }
// }
func TestAppHelpPrinter(t *testing.T) { func TestAppHelpPrinter(t *testing.T) {
oldPrinter := HelpPrinter oldPrinter := HelpPrinter