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

Commit

Permalink
tests for prods, apps
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Jul 25, 2019
1 parent 169a804 commit 7ae4ddf
Showing 1 changed file with 108 additions and 10 deletions.
118 changes: 108 additions & 10 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,6 @@ func TestListExpandDeveloper(t *testing.T) {
}
}

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
func TestCreateKVM(t *testing.T) {
name := "test"
Expand Down Expand Up @@ -194,3 +184,111 @@ func TestSetSync(t *testing.T) {
t.Fatal("Invalid identity test should have failed")
}
}

func TestCreateProxy(t *testing.T) {
name := "test"

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

}

func TestCreateProduct(t *testing.T) {
name := "test"
envs := "test"
proxy := "test"
approval := "auto"

cmd := exec.Command(apigeecli, "products", "create", "-o", org, "-n", name, "-e", envs, "-p", proxy, "-f", approval, "-t", token)
err := cmd.Run()
if err != nil {
t.Fatal(err)
}
}

func TestCreateApp(t *testing.T) {
name := "test"
email := "[email protected]"
product := "test"

cmd := exec.Command(apigeecli, "apps", "create", "-o", org, "-n", name, "-e", email, "-p", product, "-t", token)
err := cmd.Run()
if err != nil {
t.Fatal(err)
}

}

func TestGetApp(t *testing.T) {
name := "test"

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

}

func TestListApp(t *testing.T) {

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

}

func TestDeleteApp(t *testing.T) {
name := "test"

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

}

func TestGetProduct(t *testing.T) {
name := "test"

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

func TestListProduct(t *testing.T) {

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

func TestDeleteProduct(t *testing.T) {
name := "test"

cmd := exec.Command(apigeecli, "kvms", "create", "-o", org, "-n", name, "-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)
}
}

0 comments on commit 7ae4ddf

Please sign in to comment.