createServer() takes a key now.
diff --git a/acceptance/rackspace/compute/v2/servers_test.go b/acceptance/rackspace/compute/v2/servers_test.go
index af4bbe0..5359450 100644
--- a/acceptance/rackspace/compute/v2/servers_test.go
+++ b/acceptance/rackspace/compute/v2/servers_test.go
@@ -38,14 +38,20 @@
th.AssertNoErr(t, err)
name := tools.RandomString("Gophercloud-", 8)
- t.Logf("Creating server [%s].", name)
- s, err := servers.Create(client, &servers.CreateOpts{
+
+ opts := &servers.CreateOpts{
Name: name,
ImageRef: options.imageID,
FlavorRef: options.flavorID,
- KeyPair: keyName,
DiskConfig: diskconfig.Manual,
- }).Extract()
+ }
+
+ if keyName != "" {
+ opts.KeyPair = keyName
+ }
+
+ t.Logf("Creating server [%s].", name)
+ s, err := servers.Create(client, opts).Extract()
th.AssertNoErr(t, err)
t.Logf("Creating server.")