github.com/gophercloud/gophercloud@v1.11.0/internal/acceptance/openstack/clustering/v1/actions_test.go (about) 1 //go:build acceptance || clustering || actions 2 // +build acceptance clustering actions 3 4 package v1 5 6 import ( 7 "testing" 8 9 "github.com/gophercloud/gophercloud/internal/acceptance/clients" 10 "github.com/gophercloud/gophercloud/internal/acceptance/tools" 11 "github.com/gophercloud/gophercloud/openstack/clustering/v1/actions" 12 th "github.com/gophercloud/gophercloud/testhelper" 13 ) 14 15 func TestActionsList(t *testing.T) { 16 client, err := clients.NewClusteringV1Client() 17 th.AssertNoErr(t, err) 18 19 opts := actions.ListOpts{ 20 Limit: 200, 21 } 22 23 allPages, err := actions.List(client, opts).AllPages() 24 th.AssertNoErr(t, err) 25 26 allActions, err := actions.ExtractActions(allPages) 27 th.AssertNoErr(t, err) 28 29 for _, action := range allActions { 30 tools.PrintResource(t, action) 31 } 32 }