Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

Add functional test for list #430

Merged
merged 2 commits into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion functional/core/core_feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@
],
"result":""
},
{
"entry":"List",
"steps":[
{
"key":"",
"value":"list repo",
"action":"main"
}
],
"result":"commons"
},
{
"entry":"List repo",
"steps":[
Expand Down Expand Up @@ -263,4 +274,4 @@
],
"result":"Use \"rit <command> --help\" for more information about a given command."
}
]
]
36 changes: 18 additions & 18 deletions functional/core/core_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ var _ = Describe("RitCore", func() {
Expect(out).To(ContainSubstring(scenario.Result))
},

Entry("Show context", scenariosCore[0]),
// Entry("Set context", scenariosCore[1]),
// Entry("Delete context", scenariosCore[2]),
Entry(scenariosCore[0].Entry, scenariosCore[0]),
// Entry(scenariosCore[1].Entry, scenariosCore[1]),
// Entry(scenariosCore[2].Entry, scenariosCore[2]),

Entry("Add", scenariosCore[3]),
// Entry("Add new repo", scenariosCore[4]),
Entry(scenariosCore[3].Entry, scenariosCore[3]),
// Entry(scenariosCore[4].Entry, scenariosCore[4]),

Entry("List repo", scenariosCore[5]),
// Entry("Delete repo", scenariosCore[6]),
Entry(scenariosCore[5].Entry, scenariosCore[5]),
Entry(scenariosCore[6].Entry, scenariosCore[6]),
// Entry(scenariosCore[7].Entry, scenariosCore[7]),

// Entry("Set Credential", scenariosCore[7]),
Entry("Set", scenariosCore[8]),
// Entry("Update repo", scenariosCore[9]),
// Entry(scenariosCore[8].Entry, scenariosCore[8]),
Entry(scenariosCore[9].Entry, scenariosCore[9]),
// Entry(scenariosCore[10].Entry, scenariosCore[10]),

Entry("Completion", scenariosCore[10]),
Entry("Completion bash", scenariosCore[11]),
Entry("Completion zsh", scenariosCore[12]),
Entry(scenariosCore[11].Entry, scenariosCore[11]),
Entry(scenariosCore[12].Entry, scenariosCore[12]),
Entry(scenariosCore[13].Entry, scenariosCore[13]),

Entry("Version", scenariosCore[13]),
Entry("Delete", scenariosCore[14]),
Entry("Show", scenariosCore[15]),
Entry("Help", scenariosCore[16]),
Entry(scenariosCore[14].Entry, scenariosCore[14]),
Entry(scenariosCore[15].Entry, scenariosCore[15]),
Entry(scenariosCore[16].Entry, scenariosCore[16]),
Entry(scenariosCore[17].Entry, scenariosCore[17]),
)

})
11 changes: 5 additions & 6 deletions functional/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
)

const (
rit = "rit"
rit = "rit"
// initCmd = "init"
)

Expand All @@ -50,7 +50,7 @@ func (scenario *Scenario) RunSteps() (string, error) {
fmt.Println("Running: " + scenario.Entry)

os := runtime.GOOS
if os == "windows" && len(scenario.Steps) >= 2 {
if os == "windows" && len(scenario.Steps) >= 2 {
ginkgo.Skip("Scenarios with multi steps for windows doesnt work")
return "", nil
} else {
Expand All @@ -62,7 +62,7 @@ func (scenario *Scenario) RunSteps() (string, error) {
func (scenario *Scenario) RunStdin() (string, error) {
fmt.Println("Running STDIN: " + scenario.Entry)
os := runtime.GOOS
if os == "windows" {
if os == "windows" {
b2, err := scenario.runStdinForWindows()
return b2.String(), err
} else {
Expand All @@ -74,7 +74,7 @@ func (scenario *Scenario) RunStdin() (string, error) {

func RitSingleInit() {
os := runtime.GOOS
if os == "windows" {
if os == "windows" {
setUpRitSingleWin()
} else {
setUpRitSingleUnix()
Expand All @@ -84,7 +84,7 @@ func RitSingleInit() {

func RitClearConfigs() {
os := runtime.GOOS
if os == "windows" {
if os == "windows" {
setUpClearSetupWindows()
} else {
setUpClearSetupUnix()
Expand Down Expand Up @@ -116,4 +116,3 @@ func scannerTerminal(out io.Reader) *bufio.Scanner {
scanner.Split(bufio.ScanLines)
return scanner
}

1 change: 0 additions & 1 deletion functional/scaffold/scaffold_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/


package scaffold

import (
Expand Down