From 2cd387622e343ec45b5a037b007633ee796cd92c Mon Sep 17 00:00:00 2001 From: Paul Thornthwaite Date: Tue, 9 Dec 2014 20:30:38 +0000 Subject: [PATCH] Specs for existing `Fog::Bin` interface Prepartion for fog/fog-core#105 --- Rakefile | 1 + spec/fog/bin/atmos_spec.rb | 10 ++ spec/fog/bin/aws_spec.rb | 10 ++ spec/fog/bin/baremetalcloud_spec.rb | 10 ++ spec/fog/bin/bluebox_spec.rb | 10 ++ spec/fog/bin/brightbox_spec.rb | 10 ++ spec/fog/bin/clodo_spec.rb | 10 ++ spec/fog/bin/cloudsigma_spec.rb | 10 ++ spec/fog/bin/cloudstack_spec.rb | 10 ++ spec/fog/bin/digitalocean_spec.rb | 10 ++ spec/fog/bin/dnsimple_spec.rb | 10 ++ spec/fog/bin/dnsmadeeasy_spec.rb | 10 ++ spec/fog/bin/dreamhost_spec.rb | 10 ++ spec/fog/bin/dynect_spec.rb | 10 ++ spec/fog/bin/ecloud_spec.rb | 10 ++ spec/fog/bin/fogdocker_spec.rb | 10 ++ spec/fog/bin/glesys_spec.rb | 10 ++ spec/fog/bin/gogrid_spec.rb | 10 ++ spec/fog/bin/google_spec.rb | 10 ++ spec/fog/bin/hp_spec.rb | 10 ++ spec/fog/bin/ibm_spec.rb | 10 ++ spec/fog/bin/internetarchive_spec.rb | 10 ++ spec/fog/bin/joyent_spec.rb | 10 ++ spec/fog/bin/libvirt_spec.rb | 10 ++ spec/fog/bin/linode_spec.rb | 10 ++ spec/fog/bin/local_spec.rb | 10 ++ spec/fog/bin/ninefold_spec.rb | 10 ++ spec/fog/bin/opennebula_spec.rb | 10 ++ spec/fog/bin/openstack_spec.rb | 10 ++ spec/fog/bin/openvz_spec.rb | 10 ++ spec/fog/bin/ovirt_spec.rb | 10 ++ spec/fog/bin/profitbricks_spec.rb | 10 ++ spec/fog/bin/rackspace_spec.rb | 10 ++ spec/fog/bin/rage4_spec.rb | 10 ++ spec/fog/bin/riakcs_spec.rb | 10 ++ spec/fog/bin/sakuracloud_spec.rb | 10 ++ spec/fog/bin/serverlove_spec.rb | 10 ++ spec/fog/bin/softlayer_spec.rb | 10 ++ spec/fog/bin/stormondemand_spec.rb | 10 ++ spec/fog/bin/vcloud_spec.rb | 10 ++ spec/fog/bin/vclouddirector_spec.rb | 10 ++ spec/fog/bin/vmfusion_spec.rb | 10 ++ spec/fog/bin/voxel_spec.rb | 10 ++ spec/fog/bin/vsphere_spec.rb | 10 ++ spec/fog/bin/xenserver_spec.rb | 10 ++ spec/fog/bin/zerigo_spec.rb | 10 ++ spec/fog/bin_spec.rb | 155 +++++++++++++++++++++++++++ spec/helpers/bin.rb | 30 ++++++ 48 files changed, 636 insertions(+) create mode 100644 spec/fog/bin/atmos_spec.rb create mode 100644 spec/fog/bin/aws_spec.rb create mode 100644 spec/fog/bin/baremetalcloud_spec.rb create mode 100644 spec/fog/bin/bluebox_spec.rb create mode 100644 spec/fog/bin/brightbox_spec.rb create mode 100644 spec/fog/bin/clodo_spec.rb create mode 100644 spec/fog/bin/cloudsigma_spec.rb create mode 100644 spec/fog/bin/cloudstack_spec.rb create mode 100644 spec/fog/bin/digitalocean_spec.rb create mode 100644 spec/fog/bin/dnsimple_spec.rb create mode 100644 spec/fog/bin/dnsmadeeasy_spec.rb create mode 100644 spec/fog/bin/dreamhost_spec.rb create mode 100644 spec/fog/bin/dynect_spec.rb create mode 100644 spec/fog/bin/ecloud_spec.rb create mode 100644 spec/fog/bin/fogdocker_spec.rb create mode 100644 spec/fog/bin/glesys_spec.rb create mode 100644 spec/fog/bin/gogrid_spec.rb create mode 100644 spec/fog/bin/google_spec.rb create mode 100644 spec/fog/bin/hp_spec.rb create mode 100644 spec/fog/bin/ibm_spec.rb create mode 100644 spec/fog/bin/internetarchive_spec.rb create mode 100644 spec/fog/bin/joyent_spec.rb create mode 100644 spec/fog/bin/libvirt_spec.rb create mode 100644 spec/fog/bin/linode_spec.rb create mode 100644 spec/fog/bin/local_spec.rb create mode 100644 spec/fog/bin/ninefold_spec.rb create mode 100644 spec/fog/bin/opennebula_spec.rb create mode 100644 spec/fog/bin/openstack_spec.rb create mode 100644 spec/fog/bin/openvz_spec.rb create mode 100644 spec/fog/bin/ovirt_spec.rb create mode 100644 spec/fog/bin/profitbricks_spec.rb create mode 100644 spec/fog/bin/rackspace_spec.rb create mode 100644 spec/fog/bin/rage4_spec.rb create mode 100644 spec/fog/bin/riakcs_spec.rb create mode 100644 spec/fog/bin/sakuracloud_spec.rb create mode 100644 spec/fog/bin/serverlove_spec.rb create mode 100644 spec/fog/bin/softlayer_spec.rb create mode 100644 spec/fog/bin/stormondemand_spec.rb create mode 100644 spec/fog/bin/vcloud_spec.rb create mode 100644 spec/fog/bin/vclouddirector_spec.rb create mode 100644 spec/fog/bin/vmfusion_spec.rb create mode 100644 spec/fog/bin/voxel_spec.rb create mode 100644 spec/fog/bin/vsphere_spec.rb create mode 100644 spec/fog/bin/xenserver_spec.rb create mode 100644 spec/fog/bin/zerigo_spec.rb create mode 100644 spec/fog/bin_spec.rb create mode 100644 spec/helpers/bin.rb diff --git a/Rakefile b/Rakefile index 340190c01..3c571f629 100644 --- a/Rakefile +++ b/Rakefile @@ -52,6 +52,7 @@ task :travis => ['test', 'test:travis'] Rake::TestTask.new do |t| t.pattern = File.join("spec", "**", "*_spec.rb") + t.libs << "spec" end namespace :test do diff --git a/spec/fog/bin/atmos_spec.rb b/spec/fog/bin/atmos_spec.rb new file mode 100644 index 000000000..098a7aaf6 --- /dev/null +++ b/spec/fog/bin/atmos_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Atmos do + include Fog::BinSpec + + let(:subject) { Atmos } +end diff --git a/spec/fog/bin/aws_spec.rb b/spec/fog/bin/aws_spec.rb new file mode 100644 index 000000000..aa3daa423 --- /dev/null +++ b/spec/fog/bin/aws_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe AWS do + include Fog::BinSpec + + let(:subject) { AWS } +end diff --git a/spec/fog/bin/baremetalcloud_spec.rb b/spec/fog/bin/baremetalcloud_spec.rb new file mode 100644 index 000000000..626874103 --- /dev/null +++ b/spec/fog/bin/baremetalcloud_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe BareMetalCloud do + include Fog::BinSpec + + let(:subject) { BareMetalCloud } +end diff --git a/spec/fog/bin/bluebox_spec.rb b/spec/fog/bin/bluebox_spec.rb new file mode 100644 index 000000000..3e3060293 --- /dev/null +++ b/spec/fog/bin/bluebox_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Bluebox do + include Fog::BinSpec + + let(:subject) { Bluebox } +end diff --git a/spec/fog/bin/brightbox_spec.rb b/spec/fog/bin/brightbox_spec.rb new file mode 100644 index 000000000..b1c08ca22 --- /dev/null +++ b/spec/fog/bin/brightbox_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Brightbox do + include Fog::BinSpec + + let(:subject) { Brightbox } +end diff --git a/spec/fog/bin/clodo_spec.rb b/spec/fog/bin/clodo_spec.rb new file mode 100644 index 000000000..3d9fa1e54 --- /dev/null +++ b/spec/fog/bin/clodo_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Clodo do + include Fog::BinSpec + + let(:subject) { Clodo } +end diff --git a/spec/fog/bin/cloudsigma_spec.rb b/spec/fog/bin/cloudsigma_spec.rb new file mode 100644 index 000000000..864af873e --- /dev/null +++ b/spec/fog/bin/cloudsigma_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe CloudSigma do + include Fog::BinSpec + + let(:subject) { CloudSigma } +end diff --git a/spec/fog/bin/cloudstack_spec.rb b/spec/fog/bin/cloudstack_spec.rb new file mode 100644 index 000000000..e20fdd173 --- /dev/null +++ b/spec/fog/bin/cloudstack_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Cloudstack do + include Fog::BinSpec + + let(:subject) { Cloudstack } +end diff --git a/spec/fog/bin/digitalocean_spec.rb b/spec/fog/bin/digitalocean_spec.rb new file mode 100644 index 000000000..3bd97bb1c --- /dev/null +++ b/spec/fog/bin/digitalocean_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe DigitalOcean do + include Fog::BinSpec + + let(:subject) { DigitalOcean } +end diff --git a/spec/fog/bin/dnsimple_spec.rb b/spec/fog/bin/dnsimple_spec.rb new file mode 100644 index 000000000..34f1eedff --- /dev/null +++ b/spec/fog/bin/dnsimple_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe DNSimple do + include Fog::BinSpec + + let(:subject) { DNSimple } +end diff --git a/spec/fog/bin/dnsmadeeasy_spec.rb b/spec/fog/bin/dnsmadeeasy_spec.rb new file mode 100644 index 000000000..4e9c1b2c9 --- /dev/null +++ b/spec/fog/bin/dnsmadeeasy_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe DNSMadeEasy do + include Fog::BinSpec + + let(:subject) { DNSMadeEasy } +end diff --git a/spec/fog/bin/dreamhost_spec.rb b/spec/fog/bin/dreamhost_spec.rb new file mode 100644 index 000000000..42300adc6 --- /dev/null +++ b/spec/fog/bin/dreamhost_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Dreamhost do + include Fog::BinSpec + + let(:subject) { Dreamhost } +end diff --git a/spec/fog/bin/dynect_spec.rb b/spec/fog/bin/dynect_spec.rb new file mode 100644 index 000000000..52c6e39ee --- /dev/null +++ b/spec/fog/bin/dynect_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Dynect do + include Fog::BinSpec + + let(:subject) { Dynect } +end diff --git a/spec/fog/bin/ecloud_spec.rb b/spec/fog/bin/ecloud_spec.rb new file mode 100644 index 000000000..83e7e84e7 --- /dev/null +++ b/spec/fog/bin/ecloud_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Ecloud do + include Fog::BinSpec + + let(:subject) { Ecloud } +end diff --git a/spec/fog/bin/fogdocker_spec.rb b/spec/fog/bin/fogdocker_spec.rb new file mode 100644 index 000000000..8fcd2c4ae --- /dev/null +++ b/spec/fog/bin/fogdocker_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Fogdocker do + include Fog::BinSpec + + let(:subject) { Fogdocker } +end diff --git a/spec/fog/bin/glesys_spec.rb b/spec/fog/bin/glesys_spec.rb new file mode 100644 index 000000000..915271e00 --- /dev/null +++ b/spec/fog/bin/glesys_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Glesys do + include Fog::BinSpec + + let(:subject) { Glesys } +end diff --git a/spec/fog/bin/gogrid_spec.rb b/spec/fog/bin/gogrid_spec.rb new file mode 100644 index 000000000..08a4c4792 --- /dev/null +++ b/spec/fog/bin/gogrid_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe GoGrid do + include Fog::BinSpec + + let(:subject) { GoGrid } +end diff --git a/spec/fog/bin/google_spec.rb b/spec/fog/bin/google_spec.rb new file mode 100644 index 000000000..907fd2ac1 --- /dev/null +++ b/spec/fog/bin/google_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Google do + include Fog::BinSpec + + let(:subject) { Google } +end diff --git a/spec/fog/bin/hp_spec.rb b/spec/fog/bin/hp_spec.rb new file mode 100644 index 000000000..107f3ad89 --- /dev/null +++ b/spec/fog/bin/hp_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe HP do + include Fog::BinSpec + + let(:subject) { HP } +end diff --git a/spec/fog/bin/ibm_spec.rb b/spec/fog/bin/ibm_spec.rb new file mode 100644 index 000000000..851fc8b74 --- /dev/null +++ b/spec/fog/bin/ibm_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe IBM do + include Fog::BinSpec + + let(:subject) { IBM } +end diff --git a/spec/fog/bin/internetarchive_spec.rb b/spec/fog/bin/internetarchive_spec.rb new file mode 100644 index 000000000..228919895 --- /dev/null +++ b/spec/fog/bin/internetarchive_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe InternetArchive do + include Fog::BinSpec + + let(:subject) { InternetArchive } +end diff --git a/spec/fog/bin/joyent_spec.rb b/spec/fog/bin/joyent_spec.rb new file mode 100644 index 000000000..9c5b64453 --- /dev/null +++ b/spec/fog/bin/joyent_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Joyent do + include Fog::BinSpec + + let(:subject) { Joyent } +end diff --git a/spec/fog/bin/libvirt_spec.rb b/spec/fog/bin/libvirt_spec.rb new file mode 100644 index 000000000..f67b00388 --- /dev/null +++ b/spec/fog/bin/libvirt_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Libvirt do + include Fog::BinSpec + + let(:subject) { Libvirt } +end diff --git a/spec/fog/bin/linode_spec.rb b/spec/fog/bin/linode_spec.rb new file mode 100644 index 000000000..b3b56777c --- /dev/null +++ b/spec/fog/bin/linode_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Linode do + include Fog::BinSpec + + let(:subject) { Linode } +end diff --git a/spec/fog/bin/local_spec.rb b/spec/fog/bin/local_spec.rb new file mode 100644 index 000000000..04eacf4b2 --- /dev/null +++ b/spec/fog/bin/local_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Local do + include Fog::BinSpec + + let(:subject) { Local } +end diff --git a/spec/fog/bin/ninefold_spec.rb b/spec/fog/bin/ninefold_spec.rb new file mode 100644 index 000000000..5a2a2eb4a --- /dev/null +++ b/spec/fog/bin/ninefold_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Ninefold do + include Fog::BinSpec + + let(:subject) { Ninefold } +end diff --git a/spec/fog/bin/opennebula_spec.rb b/spec/fog/bin/opennebula_spec.rb new file mode 100644 index 000000000..302eba636 --- /dev/null +++ b/spec/fog/bin/opennebula_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe OpenNebula do + include Fog::BinSpec + + let(:subject) { OpenNebula } +end diff --git a/spec/fog/bin/openstack_spec.rb b/spec/fog/bin/openstack_spec.rb new file mode 100644 index 000000000..e39e2b354 --- /dev/null +++ b/spec/fog/bin/openstack_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe OpenStack do + include Fog::BinSpec + + let(:subject) { OpenStack } +end diff --git a/spec/fog/bin/openvz_spec.rb b/spec/fog/bin/openvz_spec.rb new file mode 100644 index 000000000..26a384912 --- /dev/null +++ b/spec/fog/bin/openvz_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Openvz do + include Fog::BinSpec + + let(:subject) { Openvz } +end diff --git a/spec/fog/bin/ovirt_spec.rb b/spec/fog/bin/ovirt_spec.rb new file mode 100644 index 000000000..95af3df9d --- /dev/null +++ b/spec/fog/bin/ovirt_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Ovirt do + include Fog::BinSpec + + let(:subject) { Ovirt } +end diff --git a/spec/fog/bin/profitbricks_spec.rb b/spec/fog/bin/profitbricks_spec.rb new file mode 100644 index 000000000..e042db4cc --- /dev/null +++ b/spec/fog/bin/profitbricks_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe ProfitBricks do + include Fog::BinSpec + + let(:subject) { ProfitBricks } +end diff --git a/spec/fog/bin/rackspace_spec.rb b/spec/fog/bin/rackspace_spec.rb new file mode 100644 index 000000000..b847cf7bd --- /dev/null +++ b/spec/fog/bin/rackspace_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Rackspace do + include Fog::BinSpec + + let(:subject) { Rackspace } +end diff --git a/spec/fog/bin/rage4_spec.rb b/spec/fog/bin/rage4_spec.rb new file mode 100644 index 000000000..40dc0e081 --- /dev/null +++ b/spec/fog/bin/rage4_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Rage4 do + include Fog::BinSpec + + let(:subject) { Rage4 } +end diff --git a/spec/fog/bin/riakcs_spec.rb b/spec/fog/bin/riakcs_spec.rb new file mode 100644 index 000000000..ed3552355 --- /dev/null +++ b/spec/fog/bin/riakcs_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe RiakCS do + include Fog::BinSpec + + let(:subject) { RiakCS } +end diff --git a/spec/fog/bin/sakuracloud_spec.rb b/spec/fog/bin/sakuracloud_spec.rb new file mode 100644 index 000000000..067575e18 --- /dev/null +++ b/spec/fog/bin/sakuracloud_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe SakuraCloud do + include Fog::BinSpec + + let(:subject) { SakuraCloud } +end diff --git a/spec/fog/bin/serverlove_spec.rb b/spec/fog/bin/serverlove_spec.rb new file mode 100644 index 000000000..4b341950a --- /dev/null +++ b/spec/fog/bin/serverlove_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Serverlove do + include Fog::BinSpec + + let(:subject) { Serverlove } +end diff --git a/spec/fog/bin/softlayer_spec.rb b/spec/fog/bin/softlayer_spec.rb new file mode 100644 index 000000000..b94b2d81f --- /dev/null +++ b/spec/fog/bin/softlayer_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Softlayer do + include Fog::BinSpec + + let(:subject) { Softlayer } +end diff --git a/spec/fog/bin/stormondemand_spec.rb b/spec/fog/bin/stormondemand_spec.rb new file mode 100644 index 000000000..c07cc689d --- /dev/null +++ b/spec/fog/bin/stormondemand_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe StormOnDemand do + include Fog::BinSpec + + let(:subject) { StormOnDemand } +end diff --git a/spec/fog/bin/vcloud_spec.rb b/spec/fog/bin/vcloud_spec.rb new file mode 100644 index 000000000..e311964e9 --- /dev/null +++ b/spec/fog/bin/vcloud_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Vcloud do + include Fog::BinSpec + + let(:subject) { Vcloud } +end diff --git a/spec/fog/bin/vclouddirector_spec.rb b/spec/fog/bin/vclouddirector_spec.rb new file mode 100644 index 000000000..b39cbfbe0 --- /dev/null +++ b/spec/fog/bin/vclouddirector_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe VcloudDirector do + include Fog::BinSpec + + let(:subject) { VcloudDirector } +end diff --git a/spec/fog/bin/vmfusion_spec.rb b/spec/fog/bin/vmfusion_spec.rb new file mode 100644 index 000000000..950f3543e --- /dev/null +++ b/spec/fog/bin/vmfusion_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Vmfusion do + include Fog::BinSpec + + let(:subject) { Vmfusion } +end diff --git a/spec/fog/bin/voxel_spec.rb b/spec/fog/bin/voxel_spec.rb new file mode 100644 index 000000000..069c15f2e --- /dev/null +++ b/spec/fog/bin/voxel_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Voxel do + include Fog::BinSpec + + let(:subject) { Voxel } +end diff --git a/spec/fog/bin/vsphere_spec.rb b/spec/fog/bin/vsphere_spec.rb new file mode 100644 index 000000000..3111a0ca2 --- /dev/null +++ b/spec/fog/bin/vsphere_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Vsphere do + include Fog::BinSpec + + let(:subject) { Vsphere } +end diff --git a/spec/fog/bin/xenserver_spec.rb b/spec/fog/bin/xenserver_spec.rb new file mode 100644 index 000000000..057618b63 --- /dev/null +++ b/spec/fog/bin/xenserver_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe XenServer do + include Fog::BinSpec + + let(:subject) { XenServer } +end diff --git a/spec/fog/bin/zerigo_spec.rb b/spec/fog/bin/zerigo_spec.rb new file mode 100644 index 000000000..5ca77a445 --- /dev/null +++ b/spec/fog/bin/zerigo_spec.rb @@ -0,0 +1,10 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" +require "helpers/bin" + +describe Zerigo do + include Fog::BinSpec + + let(:subject) { Zerigo } +end diff --git a/spec/fog/bin_spec.rb b/spec/fog/bin_spec.rb new file mode 100644 index 000000000..c4f1a32f5 --- /dev/null +++ b/spec/fog/bin_spec.rb @@ -0,0 +1,155 @@ +require "minitest/autorun" +require "fog" +require "fog/bin" + +describe Fog do + describe "#providers" do + it "includes existing providers" do + assert_equal "Atmos", Fog.providers[:atmos] + assert_equal "AWS", Fog.providers[:aws] + assert_equal "BareMetalCloud", Fog.providers[:baremetalcloud] + assert_equal "Bluebox", Fog.providers[:bluebox] + assert_equal "Brightbox", Fog.providers[:brightbox] + assert_equal "Clodo", Fog.providers[:clodo] + assert_equal "CloudSigma", Fog.providers[:cloudsigma] + assert_equal "Cloudstack", Fog.providers[:cloudstack] + assert_equal "DigitalOcean", Fog.providers[:digitalocean] + assert_equal "DNSimple", Fog.providers[:dnsimple] + assert_equal "DNSMadeEasy", Fog.providers[:dnsmadeeasy] + assert_equal "Dreamhost", Fog.providers[:dreamhost] + assert_equal "Dynect", Fog.providers[:dynect] + assert_equal "Ecloud", Fog.providers[:ecloud] + assert_equal "Fogdocker", Fog.providers[:fogdocker] + assert_equal "Glesys", Fog.providers[:glesys] + assert_equal "GoGrid", Fog.providers[:gogrid] + assert_equal "Google", Fog.providers[:google] + assert_equal "HP", Fog.providers[:hp] + assert_equal "IBM", Fog.providers[:ibm] + assert_equal "InternetArchive", Fog.providers[:internetarchive] + assert_equal "Joyent", Fog.providers[:joyent] + assert_equal "Libvirt", Fog.providers[:libvirt] + assert_equal "Linode", Fog.providers[:linode] + assert_equal "Local", Fog.providers[:local] + assert_equal "Ninefold", Fog.providers[:ninefold] + assert_equal "OpenNebula", Fog.providers[:opennebula] + assert_equal "OpenStack", Fog.providers[:openstack] + assert_equal "Openvz", Fog.providers[:openvz] + assert_equal "Ovirt", Fog.providers[:ovirt] + assert_equal "ProfitBricks", Fog.providers[:profitbricks] + assert_equal "Rackspace", Fog.providers[:rackspace] + assert_equal "Rage4", Fog.providers[:rage4] + assert_equal "RiakCS", Fog.providers[:riakcs] + assert_equal "SakuraCloud", Fog.providers[:sakuracloud] + assert_equal "Serverlove", Fog.providers[:serverlove] + assert_equal "Softlayer", Fog.providers[:softlayer] + assert_equal "StormOnDemand", Fog.providers[:stormondemand] + assert_equal "Vcloud", Fog.providers[:vcloud] + assert_equal "VcloudDirector", Fog.providers[:vclouddirector] + assert_equal "Vmfusion", Fog.providers[:vmfusion] + assert_equal "Voxel", Fog.providers[:voxel] + assert_equal "Vsphere", Fog.providers[:vsphere] + assert_equal "XenServer", Fog.providers[:xenserver] + assert_equal "Zerigo", Fog.providers[:zerigo] + end + end + + describe "#registered_providers" do + it "includes existing providers" do + assert_includes Fog.registered_providers, "Atmos" + assert_includes Fog.registered_providers, "AWS" + assert_includes Fog.registered_providers, "BareMetalCloud" + assert_includes Fog.registered_providers, "Bluebox" + assert_includes Fog.registered_providers, "Brightbox" + assert_includes Fog.registered_providers, "Clodo" + assert_includes Fog.registered_providers, "CloudSigma" + assert_includes Fog.registered_providers, "Cloudstack" + assert_includes Fog.registered_providers, "DigitalOcean" + assert_includes Fog.registered_providers, "DNSimple" + assert_includes Fog.registered_providers, "DNSMadeEasy" + assert_includes Fog.registered_providers, "Dreamhost" + assert_includes Fog.registered_providers, "Dynect" + assert_includes Fog.registered_providers, "Ecloud" + assert_includes Fog.registered_providers, "Fogdocker" + assert_includes Fog.registered_providers, "Glesys" + assert_includes Fog.registered_providers, "GoGrid" + assert_includes Fog.registered_providers, "Google" + assert_includes Fog.registered_providers, "HP" + assert_includes Fog.registered_providers, "IBM" + assert_includes Fog.registered_providers, "InternetArchive" + assert_includes Fog.registered_providers, "Joyent" + assert_includes Fog.registered_providers, "Libvirt" + assert_includes Fog.registered_providers, "Linode" + assert_includes Fog.registered_providers, "Local" + assert_includes Fog.registered_providers, "Ninefold" + assert_includes Fog.registered_providers, "OpenNebula" + assert_includes Fog.registered_providers, "OpenStack" + assert_includes Fog.registered_providers, "Openvz" + assert_includes Fog.registered_providers, "Ovirt" + assert_includes Fog.registered_providers, "ProfitBricks" + assert_includes Fog.registered_providers, "Rackspace" + assert_includes Fog.registered_providers, "Rage4" + assert_includes Fog.registered_providers, "RiakCS" + assert_includes Fog.registered_providers, "SakuraCloud" + assert_includes Fog.registered_providers, "Serverlove" + assert_includes Fog.registered_providers, "Softlayer" + assert_includes Fog.registered_providers, "StormOnDemand" + assert_includes Fog.registered_providers, "Vcloud" + assert_includes Fog.registered_providers, "VcloudDirector" + assert_includes Fog.registered_providers, "Vmfusion" + assert_includes Fog.registered_providers, "Voxel" + assert_includes Fog.registered_providers, "Vsphere" + assert_includes Fog.registered_providers, "XenServer" + assert_includes Fog.registered_providers, "Zerigo" + end + end + + describe "#available_providers" do + it "includes existing providers" do + assert_includes Fog.available_providers, "Atmos" if Atmos.available? + assert_includes Fog.available_providers, "AWS" if AWS.available? + assert_includes Fog.available_providers, "BareMetalCloud" if BareMetalCloud.available? + assert_includes Fog.available_providers, "Bluebox" if Bluebox.available? + assert_includes Fog.available_providers, "Brightbox" if Brightbox.available? + assert_includes Fog.available_providers, "Clodo" if Clodo.available? + assert_includes Fog.available_providers, "CloudSigma" if CloudSigma.available? + assert_includes Fog.available_providers, "Cloudstack" if Cloudstack.available? + assert_includes Fog.available_providers, "DigitalOcean" if DigitalOcean.available? + assert_includes Fog.available_providers, "DNSimple" if DNSimple.available? + assert_includes Fog.available_providers, "DNSMadeEasy" if DNSMadeEasy.available? + assert_includes Fog.available_providers, "Dreamhost" if Dreamhost.available? + assert_includes Fog.available_providers, "Dynect" if Dynect.available? + assert_includes Fog.available_providers, "Ecloud" if Ecloud.available? + assert_includes Fog.available_providers, "Fogdocker" if Fogdocker.available? + assert_includes Fog.available_providers, "Glesys" if Glesys.available? + assert_includes Fog.available_providers, "GoGrid" if GoGrid.available? + assert_includes Fog.available_providers, "Google" if Google.available? + assert_includes Fog.available_providers, "HP" if HP.available? + assert_includes Fog.available_providers, "IBM" if IBM.available? + assert_includes Fog.available_providers, "InternetArchive" if InternetArchive.available? + assert_includes Fog.available_providers, "Joyent" if Joyent.available? + assert_includes Fog.available_providers, "Libvirt" if Libvirt.available? + assert_includes Fog.available_providers, "Linode" if Linode.available? + assert_includes Fog.available_providers, "Local" if Local.available? + assert_includes Fog.available_providers, "Ninefold" if Ninefold.available? + assert_includes Fog.available_providers, "OpenNebula" if OpenNebula.available? + assert_includes Fog.available_providers, "OpenStack" if OpenStack.available? + assert_includes Fog.available_providers, "Openvz" if Openvz.available? + assert_includes Fog.available_providers, "Ovirt" if Ovirt.available? + assert_includes Fog.available_providers, "ProfitBricks" if ProfitBricks.available? + assert_includes Fog.available_providers, "Rackspace" if Rackspace.available? + assert_includes Fog.available_providers, "Rage4" if Rage4.available? + assert_includes Fog.available_providers, "RiakCS" if RiakCS.available? + assert_includes Fog.available_providers, "SakuraCloud" if SakuraCloud.available? + assert_includes Fog.available_providers, "Serverlove" if Serverlove.available? + assert_includes Fog.available_providers, "Softlayer" if Softlayer.available? + assert_includes Fog.available_providers, "StormOnDemand" if StormOnDemand.available? + assert_includes Fog.available_providers, "Vcloud" if Vcloud.available? + assert_includes Fog.available_providers, "VcloudDirector" if VcloudDirector.available? + assert_includes Fog.available_providers, "Vmfusion" if Vmfusion.available? + assert_includes Fog.available_providers, "Voxel" if Voxel.available? + assert_includes Fog.available_providers, "Vsphere" if Vsphere.available? + assert_includes Fog.available_providers, "XenServer" if XenServer.available? + assert_includes Fog.available_providers, "Zerigo" if Zerigo.available? + end + end +end diff --git a/spec/helpers/bin.rb b/spec/helpers/bin.rb new file mode 100644 index 000000000..5b72bdf6c --- /dev/null +++ b/spec/helpers/bin.rb @@ -0,0 +1,30 @@ +module Fog + module BinSpec + extend Minitest::Spec::DSL + + it "responds to available?" do + assert_respond_to subject, :available? + end + + it "responds to class_for" do + assert_respond_to subject, :class_for + end + + it "#class_for raises ArgumentError for unknown services" do + assert_raises(ArgumentError) { subject.class_for(:unknown) } + end + + it "responds to collections" do + skip if subject == ::Google + assert_respond_to subject, :collections + end + + it "responds to []" do + assert_respond_to subject, :[] + end + + it "responds to services" do + assert_respond_to subject, :services + end + end +end