Tests for CLI (#6)

* Completed List cmd and added API calls

* Minor comments and add delete code to pass linting

* Typo in descriptions

* Minor comments

* Validations

* Validations-1

* improved branch flag validation

* removed build

* working after refactory with bad names

* Command working, test not working

* Corrected creation of service

* Finalized structure using service

* Deleted tests

* cleanup

* cleanup

* cleanup

* removed space with tab

* aligned types in model.go

* Update model.go

* resolved comments

* Refactor

* removed long descriptions

* Working incomplete tests

* Completed tests

* cleanup

* checks

* PR comments

* PR comments

* minor comment issue

* minor comment issue

* updated tests to work with workflow

* Updated tests to support new option service

* Improved eror handling for list

* Improved error handling

* Upgraded go-gh

* reusing rest client error
This commit is contained in:
Deepak Dahiya
2022-07-14 02:14:03 +05:30
committed by GitHub
parent 47c4b91fe4
commit db34270ecb
11 changed files with 615 additions and 61 deletions

10
go.mod
View File

@@ -5,15 +5,20 @@ go 1.18
require (
github.com/AlecAivazis/survey/v2 v2.3.5
github.com/TwiN/go-color v1.1.0
github.com/cli/go-gh v0.0.3
github.com/cli/go-gh v0.0.4-0.20220623035622-91ca4ef447d4
github.com/nleeper/goment v1.4.4
github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.7.0
)
require github.com/pmezard/go-difflib v1.0.0 // indirect
require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/cli/safeexec v1.0.0 // indirect
github.com/cli/shurcooL-graphql v0.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
github.com/henvic/httpretty v0.0.6 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
@@ -27,5 +32,6 @@ require (
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect
golang.org/x/term v0.0.0-20210503060354-a79de5458b56 // indirect
golang.org/x/text v0.3.6 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gopkg.in/h2non/gock.v1 v1.1.2
gopkg.in/yaml.v3 v3.0.1 // indirect
)