1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/joyent/requests/compute/datasets_tests.rb

59 lines
1.7 KiB
Ruby
Raw Normal View History

Shindo.tests("Fog::Compute[:joyent] | dataset requests", ["joyent"]) do
@dataset_format = {
"description" => String,
"requirements" => {
"max_memory" => Integer,
"min_memory" => Integer
},
"name" => String,
"version" => String,
"os" => String,
"id" => String,
"urn" => String,
"default" => Fog::Boolean,
"type" => String,
2012-02-21 03:31:22 -05:00
"created" => Time,
}
if Fog.mock?
Fog::Compute[:joyent].data[:datasets] = {
2012-02-21 03:31:22 -05:00
"33904834-1f01-49d3-bed3-b642e158c375" => {
"id" => "33904834-1f01-49d3-bed3-b642e158c375",
"urn" => "sdc:sdc:zeus-simple-lb-200mbps:1.1.1",
"name" => "zeus-simple-lb-200mbps",
"os" => "smartos",
"type" => "smartmachine",
2012-02-21 03:31:22 -05:00
"description" => "Zeus Simple Load Balancer 200 Mbps SmartMachine",
"default" => false,
"requirements" => {
"max_memory" => 32768,
"min_memory" => 4096
},
2012-02-21 03:31:22 -05:00
"version" => "1.1.1",
"created" => Time.parse("2011-09-15T07:39:13+00:00")
},
2012-02-21 03:31:22 -05:00
"3fcf35d2-dd79-11e0-bdcd-b3c7ac8aeea6" => {
"id" => "3fcf35d2-dd79-11e0-bdcd-b3c7ac8aeea6",
"urn" => "sdc:sdc:mysql:1.4.1",
"name" => "mysql",
"os" => "smartos",
"type" => "smartmachine",
2012-02-21 03:31:22 -05:00
"description" => "MySQL SmartMachine",
"default" => false,
"requirements" => {
"max_memory" => 32768,
"min_memory" => 4096
},
2012-02-21 03:31:22 -05:00
"version" => "1.4.1",
"created" => Time.parse("2011-09-15T05:01:34+00:00")
}
}
end
tests("#list_datasets") do
formats(@dataset_format) do
Fog::Compute[:joyent].list_datasets.body.first
end
end
end