Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Merge branch 'test'
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Jul 22, 2019
2 parents 52361df + ce5ee3e commit f40d9fc
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestMain(t *testing.T) {
}
}

// orgs test
func TestListOrgs(t *testing.T) {
cmd := exec.Command(apigeecli, "orgs", "list", "-t", token)
err := cmd.Run()
Expand All @@ -45,6 +46,7 @@ func TestSetMart(t *testing.T) {
}
}

// env tests
func TestListEnvs(t *testing.T) {
cmd := exec.Command(apigeecli, "envs", "list", "-o", org, "-t", token)
err := cmd.Run()
Expand All @@ -60,3 +62,59 @@ func TestGetEnv(t *testing.T) {
t.Fatal(err)
}
}

// developers test
func TestCreateDeveloper(t *testing.T) {
email := "[email protected]"
first := "frstname"
last := "lastname"
user := "username"

cmd := exec.Command(apigeecli, "developers", "create", "-o", org, "-n", email, "-f", first, "-s", last, "-u", user, "-t", token)
err := cmd.Run()
if err != nil {
t.Fatal(err)
}
}

func TestGetDeveloper(t *testing.T) {
email := "[email protected]"

cmd := exec.Command(apigeecli, "developers", "get", "-o", org, "-n", email, "-t", token)
err := cmd.Run()
if err != nil {
t.Fatal(err)
}
}

func TestListDeveloper(t *testing.T) {

cmd := exec.Command(apigeecli, "developers", "list", "-o", org, "-t", token)
err := cmd.Run()
if err != nil {
t.Fatal(err)
}
}

func TestListExpandDeveloper(t *testing.T) {
expand := "true"

cmd := exec.Command(apigeecli, "developers", "list", "-o", org, "-x", expand, "-t", token)
err := cmd.Run()
if err != nil {
t.Fatal(err)
}
}

func TestDeleteDeveloper(t *testing.T) {
email := "[email protected]"

cmd := exec.Command(apigeecli, "developers", "delete", "-o", org, "-n", email, "-t", token)
err := cmd.Run()
if err != nil {
t.Fatal(err)
}
}

// kvm test

0 comments on commit f40d9fc

Please sign in to comment.