From 3a2e20307f44344fa917d620c4ffab39500b2f6e Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Mon, 15 Jun 2015 16:37:43 -0700 Subject: [PATCH] Set the project when creating/destroying pd disks. --- test/e2e/pd.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/pd.go b/test/e2e/pd.go index 071d7b11f3f..712015af334 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -193,7 +193,7 @@ func createPD() (string, error) { zone := testContext.CloudConfig.Zone // TODO: make this hit the compute API directly instread of shelling out to gcloud. - err := exec.Command("gcloud", "compute", "disks", "create", "--zone="+zone, "--size=10GB", pdName).Run() + err := exec.Command("gcloud", "compute", "--project="+testContext.CloudConfig.ProjectID, "disks", "create", "--zone="+zone, "--size=10GB", pdName).Run() if err != nil { return "", err } @@ -214,7 +214,7 @@ func deletePD(pdName string) error { zone := testContext.CloudConfig.Zone // TODO: make this hit the compute API directly. - return exec.Command("gcloud", "compute", "disks", "delete", "--zone="+zone, pdName).Run() + return exec.Command("gcloud", "compute", "--project="+testContext.CloudConfig.ProjectID, "disks", "delete", "--zone="+zone, pdName).Run() } else { volumes, ok := testContext.CloudConfig.Provider.(aws_cloud.Volumes) if !ok { @@ -231,7 +231,7 @@ func detachPD(hostName, pdName string) error { zone := testContext.CloudConfig.Zone // TODO: make this hit the compute API directly. - return exec.Command("gcloud", "compute", "instances", "detach-disk", "--zone="+zone, "--disk="+pdName, instanceName).Run() + return exec.Command("gcloud", "compute", "--project="+testContext.CloudConfig.ProjectID, "detach-disk", "--zone="+zone, "--disk="+pdName, instanceName).Run() } else { volumes, ok := testContext.CloudConfig.Provider.(aws_cloud.Volumes) if !ok {