blob: fd20064b7ce23c1b2aee8e3eebfec94ecd4b9fd5 [file] [log] [blame]
Ash Wilsone9a00892014-10-03 16:40:22 -04001// +build acceptance
2
3package v2
4
5import (
6 "testing"
7
8 extensions2 "github.com/rackspace/gophercloud/openstack/identity/v2/extensions"
9 "github.com/rackspace/gophercloud/pagination"
10 th "github.com/rackspace/gophercloud/testhelper"
11)
12
13func TestEnumerateExtensions(t *testing.T) {
14 service := authenticatedClient(t)
15
16 t.Logf("Extensions available on this identity endpoint:")
17 count := 0
18 err := extensions2.List(service).EachPage(func(page pagination.Page) (bool, error) {
19 t.Logf("--- Page %02d ---", count)
20
21 extensions, err := extensions2.ExtractExtensions(page)
22 th.AssertNoErr(t, err)
23
24 for i, ext := range extensions {
25 t.Logf("[%02d] name=[%s] namespace=[%s]", i, ext.Name, ext.Namespace)
26 t.Logf(" alias=[%s] updated=[%s]", ext.Alias, ext.Updated)
27 t.Logf(" description=[%s]", ext.Description)
28 }
29
30 count++
31 return true, nil
32 })
33 th.AssertNoErr(t, err)
34}