mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
update helper tests to match new shindo
This commit is contained in:
parent
2c0aa3b1b2
commit
fea0e70649
71 changed files with 81 additions and 107 deletions
|
@ -27,8 +27,13 @@ require 'fog/ssh'
|
|||
|
||||
module Fog
|
||||
module Errors
|
||||
|
||||
class Error < StandardError; end
|
||||
|
||||
class MockNotImplemented < Fog::Errors::Error; end
|
||||
|
||||
class NotFound < Fog::Errors::Error; end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -41,8 +46,6 @@ require 'fog/vcloud'
|
|||
|
||||
module Fog
|
||||
|
||||
class MockNotImplemented < Fog::Errors::Error; end
|
||||
|
||||
unless const_defined?(:VERSION)
|
||||
VERSION = '0.1.3'
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def describe_reserved_instances(reserved_instances_id = {})
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def modify_image_attributes(image_id, attribute, operation_type, options = {})
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -47,7 +47,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def create_load_balancer(availability_zones, lb_name, listeners)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def delete_load_balancer(lb_name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -33,7 +33,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def deregister_instances_from_load_balancer(instance_ids, lb_name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
alias :deregister_instances :deregister_instances_from_load_balancer
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def describe_instance_health(lb_name, instance_ids = [])
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -48,7 +48,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def describe_load_balancers(lb_name = [])
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def disable_availability_zones_for_load_balancer(availability_zones, lb_name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
alias :disable_zones :disable_availability_zones_for_load_balancer
|
||||
|
|
|
@ -32,7 +32,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def enable_availability_zones_for_load_balancer(availability_zones, lb_name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
alias :enable_zones :enable_availability_zones_for_load_balancer
|
||||
|
|
|
@ -33,7 +33,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def register_instances_with_load_balancer(instance_ids, lb_name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
alias :register_instances :register_instances_with_load_balancer
|
||||
|
|
|
@ -44,7 +44,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_bucket_acl(bucket_name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -44,7 +44,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_bucket_logging(bucket_name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -74,7 +74,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_bucket_object_versions(bucket_name, options = {})
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_bucket_versioning(bucket_name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -55,7 +55,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_object_acl(bucket_name, object_name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -46,7 +46,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_object_object(bucket_name, object_name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -71,7 +71,7 @@ DATA
|
|||
class Mock
|
||||
|
||||
def put_bucket_acl(bucket_name, acl)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -78,7 +78,7 @@ DATA
|
|||
class Mock
|
||||
|
||||
def put_bucket_logging(bucket_name, logging_status)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -31,7 +31,7 @@ DATA
|
|||
class Mock
|
||||
|
||||
def put_bucket_versioning(bucket_name, status)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -31,7 +31,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def select(select_expression, next_token = nil)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def delete_container(name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def delete_object(container, object)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -48,7 +48,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_container(container, options = {})
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_containers(options = {})
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_object(container, object)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -28,7 +28,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def head_container(container)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def head_containers
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def head_object(container, object)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def put_container(name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def put_object(container, object, data)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_flavor_details(flavor_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_image_details(image_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def list_flavors
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def list_flavors_detail
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def reboot_server(server_id, type)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -39,7 +39,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def create_slice(flavor_id, image_id, name)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -35,7 +35,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def delete_slice(slice_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_backups
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_flavor(flavor_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_flavors
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -28,7 +28,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_image(image_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_images
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -36,7 +36,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_slice(id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -33,7 +33,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_slices
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
class Mock
|
||||
|
||||
def get_slice(id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -31,7 +31,7 @@ module Fog
|
|||
end
|
||||
|
||||
def run(commands)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -54,7 +54,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def add_internet_service(ip_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -54,7 +54,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def add_node_service(ip)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -54,7 +54,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def create_internet_service(vdc_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def delete_internet_service(internet_service_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def delete_node_service(node_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def delete_public_ip(public_ip_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def delete_vapp(vapp_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def deploy_vapp(vapp_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -31,7 +31,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def get_catalog(vdc_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def get_catalog_item(catalog_item_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def get_internet_services(vdc_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def get_network_ips(network_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -29,7 +29,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def get_node_services(vdc_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def get_public_ip(public_ip_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def get_task(task_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -31,7 +31,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def get_tasks_list(tasks_list_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -41,7 +41,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def get_vapp(vapp_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def get_vapp_template(vapp_template_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -70,7 +70,7 @@ DATA
|
|||
module Mock
|
||||
|
||||
def instatiate_vapp_template(vapp_template_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def power_off(vapp_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def power_on(vapp_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def reset(vapp_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ module Fog
|
|||
module Mock
|
||||
|
||||
def power_shutdown(vapp_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,48 +1,19 @@
|
|||
Shindo.tests('test_helper', 'meta') do
|
||||
|
||||
tests('#has_error') do
|
||||
|
||||
tests('returns true') do
|
||||
|
||||
test('when expected error is raised') do
|
||||
has_error(StandardError) { raise StandardError.new }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
tests('returns false') do
|
||||
|
||||
test('when no error is raised') do
|
||||
!has_error(StandardError) {}
|
||||
end
|
||||
|
||||
test('when a different error is raised') do
|
||||
begin
|
||||
!has_error(StandardError) { raise Interrupt.new }
|
||||
false
|
||||
rescue Interrupt
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
tests('#has_format') do
|
||||
tests('#formats_kernel') do
|
||||
|
||||
tests('returns true') do
|
||||
|
||||
test('when format of value matches') do
|
||||
has_format({:a => :b}, {:a => Symbol})
|
||||
formats_kernel({:a => :b}, {:a => Symbol})
|
||||
end
|
||||
|
||||
test('when format of nested array elements matches') do
|
||||
has_format({:a => [:b, :c]}, {:a => [Symbol]})
|
||||
formats_kernel({:a => [:b, :c]}, {:a => [Symbol]})
|
||||
end
|
||||
|
||||
test('when format of nested hash matches') do
|
||||
has_format({:a => {:b => :c}}, {:a => {:b => Symbol}})
|
||||
formats_kernel({:a => {:b => :c}}, {:a => {:b => Symbol}})
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -50,15 +21,15 @@ Shindo.tests('test_helper', 'meta') do
|
|||
tests('returns false') do
|
||||
|
||||
test('when format of value does not match') do
|
||||
!has_format({:a => :b}, {:a => String})
|
||||
!formats_kernel({:a => :b}, {:a => String})
|
||||
end
|
||||
|
||||
test('when not all keys are checked') do
|
||||
!has_format({:a => :b}, {})
|
||||
!formats_kernel({:a => :b}, {})
|
||||
end
|
||||
|
||||
test('when some keys do not appear') do
|
||||
!has_format({}, {:a => String})
|
||||
!formats_kernel({}, {:a => String})
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue