blob: 135f5b330afd9588525c7fc3b98207fb265597be [file] [log] [blame]
Jon Perrittb6823132015-01-21 15:03:58 -07001// +build acceptance
2
3package v1
4
5import (
6 "testing"
7
8 "github.com/rackspace/gophercloud"
9 "github.com/rackspace/gophercloud/rackspace/cdn/v1/base"
10 th "github.com/rackspace/gophercloud/testhelper"
11)
12
13func TestBaseOps(t *testing.T) {
14 client := newClient(t)
15 t.Log("Retrieving Home Document")
16 testHomeDocumentGet(t, client)
17
18 t.Log("Pinging root URL")
19 testPing(t, client)
20}
21
22func testHomeDocumentGet(t *testing.T, client *gophercloud.ServiceClient) {
23 hd, err := base.Get(client).Extract()
24 th.AssertNoErr(t, err)
25 t.Logf("Retrieved home document: %+v", *hd)
26}
27
28func testPing(t *testing.T, client *gophercloud.ServiceClient) {
29 err := base.Ping(client).ExtractErr()
30 th.AssertNoErr(t, err)
31 t.Logf("Successfully pinged root URL")
32}