openstack stack resources acceptance tests
diff --git a/acceptance/openstack/orchestration/v1/stackresources_test.go b/acceptance/openstack/orchestration/v1/stackresources_test.go
index 0d2196a..b614f1c 100644
--- a/acceptance/openstack/orchestration/v1/stackresources_test.go
+++ b/acceptance/openstack/orchestration/v1/stackresources_test.go
@@ -43,27 +43,7 @@
return false, nil
})
- var resourceName string
- pager := stackresources.List(client, stackName, stack.ID, stackresources.ListOpts{})
- pager.EachPage(func(page pagination.Page) (bool, error) {
- resources, err := stackresources.ExtractResources(page)
- if err != nil {
- return false, err
- }
-
- t.Logf("%+v\n", resources)
-
- resourceName = resources[0].Name
-
- return true, nil
- })
-
- /*
- resource, err := stackresources.Find(client, stackName).Extract()
- th.AssertNoErr(t, err)
- t.Logf("Got stack resource: %+v\n", resource)
- */
-
+ resourceName := "hello_world"
resource, err := stackresources.Get(client, stackName, stack.ID, resourceName).Extract()
th.AssertNoErr(t, err)
t.Logf("Got stack resource: %+v\n", resource)
@@ -72,4 +52,11 @@
th.AssertNoErr(t, err)
t.Logf("Got stack resource metadata: %+v\n", metadata)
+ err = stackresources.List(client, stackName, stack.ID, stackresources.ListOpts{}).EachPage(func(page pagination.Page) (bool, error) {
+ resources, err := stackresources.ExtractResources(page)
+ th.AssertNoErr(t, err)
+ t.Logf("resources: %+v\n", resources)
+ return false, nil
+ })
+ th.AssertNoErr(t, err)
}
diff --git a/acceptance/openstack/orchestration/v1/stacks_test.go b/acceptance/openstack/orchestration/v1/stacks_test.go
index bee8f84..01e76d6 100644
--- a/acceptance/openstack/orchestration/v1/stacks_test.go
+++ b/acceptance/openstack/orchestration/v1/stacks_test.go
@@ -3,7 +3,6 @@
package v1
import (
- "encoding/json"
"testing"
"github.com/rackspace/gophercloud"
@@ -78,7 +77,5 @@
abandonedStack, err := stacks.Abandon(client, stackName1, stack.ID).Extract()
th.AssertNoErr(t, err)
t.Logf("Abandonded stack %+v\n", abandonedStack)
-
- abandonedStackBytes, err := json.Marshal(*abandonedStack)
th.AssertNoErr(t, err)
}