Add acceptance tests for org command
This commit is contained in:
parent
76e6fbba36
commit
2f849f03ff
2 changed files with 15 additions and 0 deletions
|
|
@ -135,6 +135,15 @@ func TestSSHKeys(t *testing.T) {
|
|||
testscript.Run(t, testScriptParamsFor(tsEnv, "ssh-key"))
|
||||
}
|
||||
|
||||
func TestOrg(t *testing.T) {
|
||||
var tsEnv testScriptEnv
|
||||
if err := tsEnv.fromEnv(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
testscript.Run(t, testScriptParamsFor(tsEnv, "org"))
|
||||
}
|
||||
|
||||
func testScriptParamsFor(tsEnv testScriptEnv, command string) testscript.Params {
|
||||
var files []string
|
||||
if tsEnv.script != "" {
|
||||
|
|
|
|||
6
acceptance/testdata/org/org-list.txtar
vendored
Normal file
6
acceptance/testdata/org/org-list.txtar
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# This test could fail if the user is a member of more than 30 organizations because
|
||||
# the `gh org list` command only returns the first 30 organizations the user is a member of
|
||||
|
||||
# List organizations the user is a member of
|
||||
exec gh org list
|
||||
stdout ${GH_ACCEPTANCE_ORG}
|
||||
Loading…
Add table
Add a link
Reference in a new issue