blob: 6732e4ed9f4194668976b1d639348bfa67687afd [file] [log] [blame]
Jon Perrittf95e3e42014-10-21 21:11:25 -05001package virtualinterfaces
Jon Perritt44b1ea22014-10-22 00:13:23 -05002
3import (
4 "testing"
5
6 "github.com/rackspace/gophercloud"
7 th "github.com/rackspace/gophercloud/testhelper"
8)
9
10const endpoint = "http://localhost:57909/"
11
12func endpointClient() *gophercloud.ServiceClient {
13 return &gophercloud.ServiceClient{Endpoint: endpoint}
14}
15
16func TestCreateURL(t *testing.T) {
17 actual := createURL(endpointClient(), "12345")
18 expected := endpoint + "servers/12345/os-virtual-interfacesv2"
19 th.AssertEquals(t, expected, actual)
20}
21
22func TestListURL(t *testing.T) {
23 actual := createURL(endpointClient(), "12345")
24 expected := endpoint + "servers/12345/os-virtual-interfacesv2"
25 th.AssertEquals(t, expected, actual)
26}
27
28func TestDeleteURL(t *testing.T) {
29 actual := deleteURL(endpointClient(), "12345", "6789")
30 expected := endpoint + "servers/12345/os-virtual-interfacesv2/6789"
31 th.AssertEquals(t, expected, actual)
32}