diff --git a/main_test.go b/main_test.go index 4134b9aa..6e50b92a 100644 --- a/main_test.go +++ b/main_test.go @@ -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() @@ -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() @@ -60,3 +62,59 @@ func TestGetEnv(t *testing.T) { t.Fatal(err) } } + +// developers test +func TestCreateDeveloper(t *testing.T) { + email := "test@example.com" + 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 := "test@example.com" + + 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 := "test@example.com" + + cmd := exec.Command(apigeecli, "developers", "delete", "-o", org, "-n", email, "-t", token) + err := cmd.Run() + if err != nil { + t.Fatal(err) + } +} + +// kvm test +