Jamie Hannaford | fac40db | 2015-02-09 17:27:08 +0100 | [diff] [blame] | 1 | package instances |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | th "github.com/rackspace/gophercloud/testhelper" |
| 7 | fake "github.com/rackspace/gophercloud/testhelper/client" |
| 8 | ) |
| 9 | |
| 10 | func TestCreate(t *testing.T) { |
| 11 | th.SetupHTTP() |
| 12 | defer th.TeardownHTTP() |
| 13 | |
| 14 | HandleCreateInstanceSuccessfully(t) |
| 15 | |
| 16 | opts := CreateOpts{ |
| 17 | Name: "json_rack_instance", |
| 18 | FlavorRef: "1", |
| 19 | Databases: DatabasesOpts{ |
| 20 | DatabaseOpts{CharSet: "utf8", Collate: "utf8_general_ci", Name: "sampledb"}, |
| 21 | DatabaseOpts{Name: "nextround"}, |
| 22 | }, |
| 23 | Users: UsersOpts{ |
| 24 | UserOpts{ |
| 25 | Name: "demouser", |
| 26 | Password: "demopassword", |
| 27 | Databases: DatabasesOpts{ |
| 28 | DatabaseOpts{Name: "sampledb"}, |
| 29 | }, |
| 30 | }, |
| 31 | }, |
| 32 | Size: 2, |
| 33 | RestorePoint: "1234567890", |
| 34 | } |
| 35 | |
| 36 | _ = Create(fake.ServiceClient(), opts) |
| 37 | } |