incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: Initial RackSpace unit tests
Date Tue, 29 Mar 2011 20:01:54 GMT
Applies cleanly, 'real' test work fine but mock gave me some errors. I 
leave the branch in place and we can talk tomorrow if you'd like me to 
run again/do something different etc. Traces (real first and then mock):

========REAL=======
rake test:rackspace
(in /home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud/server)
/usr/bin/ruby -I"lib" 
"/home/marios/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "tests/common.rb"

"tests/drivers/rackspace/setup.rb" 
"tests/drivers/rackspace/images_test.rb" 
"tests/drivers/rackspace/setup_test.rb" 
"tests/drivers/rackspace/hardware_profiles_test.rb" 
"tests/drivers/rackspace/instances_test.rb" 
"tests/drivers/rackspace/api_test.rb" 
"tests/drivers/rackspace/realms_test.rb" -v -v
Loaded suite 
/home/marios/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
test_01_it_returns_entry_points(RackspaceTest::ApiTest): .
test_02_it_has_rackspace_features(RackspaceTest::ApiTest): .
test_03_it_has_rackspace_collections(RackspaceTest::ApiTest): .
test_01_it_returns_hardware_profiles(RackspaceTest::HardwareProfilesTest): .
test_02_each_hardware_profile_has_a_name(RackspaceTest::HardwareProfilesTest): 
.
test_03_each_hardware_profile_has_correct_properties(RackspaceTest::HardwareProfilesTest):

.
test_04_it_returns_single_hardware_profile(RackspaceTest::HardwareProfilesTest): 
.
test_05_it_filter_hardware_profiles(RackspaceTest::HardwareProfilesTest): .
test_01_it_returns_images(RackspaceTest::ImagesTest): .
test_02_each_image_has_correct_properties(RackspaceTest::ImagesTest): .
test_03_it_returns_single_image(RackspaceTest::ImagesTest): .
test_01_it_can_create_instance_without_hardware_profile(RackspaceTest::InstancesTest): 
.
test_02_created_instance_has_correct_authentication(RackspaceTest::InstancesTest): 
.
test_03_created_instance_has_correct_addresses(RackspaceTest::InstancesTest): 
.
test_04_created_instance_goes_to_running_state(RackspaceTest::InstancesTest): 
.
test_05_created_instance_can_be_rebooted(RackspaceTest::InstancesTest): .
test_06_created_instance_can_be_destroyed(RackspaceTest::InstancesTest): .
test_01_it_returns_realms(RackspaceTest::RealmsTest): .
test_02_each_realm_has_a_name(RackspaceTest::RealmsTest): .
test_03_it_returns_single_realm(RackspaceTest::RealmsTest): .

Finished in 140.152888 seconds.

20 tests, 0 assertions, 0 failures, 0 errors


========MOCK=======

rake test:mock
(in /home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud/server)
/usr/bin/ruby -I"lib" 
"/home/marios/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "tests/drivers/mock/images_test.rb"

"tests/drivers/mock/hardware_profiles_test.rb" 
"tests/drivers/mock/url_for_test.rb" 
"tests/drivers/mock/instance_states_test.rb" 
"tests/drivers/mock/instances_test.rb" "tests/drivers/mock/api_test.rb" 
"tests/drivers/mock/realms_test.rb" "tests/rabbit_test.rb" -v -v
Loaded suite 
/home/marios/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
test_effective_params(DeltacloudUnitTest::ApiTest): .
test_it_allows_accessing_docs(DeltacloudUnitTest::ApiTest): .
test_it_change_features_after_driver_change(DeltacloudUnitTest::ApiTest): .
test_it_expose_available_drivers(DeltacloudUnitTest::ApiTest): .
test_it_expose_ec2_driver_entrypoints(DeltacloudUnitTest::ApiTest): .
test_it_handles_unsupported_collections(DeltacloudUnitTest::ApiTest): .
test_it_has_correct_attributes_set(DeltacloudUnitTest::ApiTest): .
test_it_respond_to_head(DeltacloudUnitTest::ApiTest): .
test_it_responses_to_html(DeltacloudUnitTest::ApiTest): .
test_it_responses_to_json(DeltacloudUnitTest::ApiTest): .
test_it_returns_entry_points(DeltacloudUnitTest::ApiTest): .
test_it_supports_matrix_params(DeltacloudUnitTest::ApiTest): .
test_it_switches_drivers(DeltacloudUnitTest::ApiTest): .
test_params(DeltacloudUnitTest::ApiTest): .
test_hardware_profiles_have_name(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_hardware_profiles_have_unique_id(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_hardware_profiles_have_unique_name(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_img1_has_correct_attributes(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_it_can_filter_using_architecture(DeltacloudUnitTest::HardwareProfilesTest): 
F
test_it_can_filter_using_owner_id(DeltacloudUnitTest::HardwareProfilesTest): 
F
test_it_can_filter_using_unknown_architecture(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_it_can_filter_using_unknown_owner_id(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_it_has_correct_attributes_set(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_it_has_unique_ids(DeltacloudUnitTest::HardwareProfilesTest): .
test_it_has_valid_urls(DeltacloudUnitTest::HardwareProfilesTest): .
test_it_require_authentication(DeltacloudUnitTest::HardwareProfilesTest): .
test_it_responses_to_html(DeltacloudUnitTest::HardwareProfilesTest): .
test_it_responses_to_json(DeltacloudUnitTest::HardwareProfilesTest): .
test_it_returns_error_on_wrong_name(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_it_returns_hardware_profiles(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_it_returns_images(DeltacloudUnitTest::HardwareProfilesTest): F
test_it_returns_valid_hardware_profile(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_it_returns_valid_image(DeltacloudUnitTest::HardwareProfilesTest): .
test_m1_xlarge_profile_has_correct_attributes(DeltacloudUnitTest::HardwareProfilesTest): 
.
test_inst1_has_correct_attributes(DeltacloudUnitTest::InstancesTest): F
test_it_create_a_new_instance_using_image_id(DeltacloudUnitTest::InstancesTest): 
F
test_it_create_a_new_instance_using_image_id_and_name(DeltacloudUnitTest::InstancesTest):

F
test_it_create_a_new_instance_using_image_id_and_name_and_hwp(DeltacloudUnitTest::InstancesTest):

F
test_it_has_correct_attributes_set(DeltacloudUnitTest::InstancesTest): .
test_it_has_unique_ids(DeltacloudUnitTest::InstancesTest): .
test_it_require_authentication(DeltacloudUnitTest::InstancesTest): .
test_it_responses_to_html(DeltacloudUnitTest::InstancesTest): F
test_it_responses_to_json(DeltacloudUnitTest::InstancesTest): E
test_it_returns_instances(DeltacloudUnitTest::InstancesTest): F
test_it_returns_valid_realm(DeltacloudUnitTest::InstancesTest): F
test_it_z0_stop_and_start_instance(DeltacloudUnitTest::InstancesTest): E
test_z0_reboot_instance(DeltacloudUnitTest::InstancesTest): E
test_z1_stop_created_instances(DeltacloudUnitTest::InstancesTest): E
test_z2_destroy_created_instances(DeltacloudUnitTest::InstancesTest): E
test_each_state_has_transition(DeltacloudUnitTest::RealmsTest): .
test_it_has_correct_attributes_set(DeltacloudUnitTest::RealmsTest): .
test_it_has_unique_ids(DeltacloudUnitTest::RealmsTest): .
test_it_not_require_authentication(DeltacloudUnitTest::RealmsTest): .
test_it_responses_to_html(DeltacloudUnitTest::RealmsTest): .
test_it_responses_to_json(DeltacloudUnitTest::RealmsTest): .
test_it_responses_to_png(DeltacloudUnitTest::RealmsTest): .
test_it_returns_instance_states(DeltacloudUnitTest::RealmsTest): .
test_it_returns_realms(DeltacloudUnitTest::RealmsTest): .
test_it_returns_valid_realm(DeltacloudUnitTest::RealmsTest): .
test_us_has_correct_attributes(DeltacloudUnitTest::RealmsTest): .
test_it_works_for_root(DeltacloudUnitTest::UrlForTest): .
test_it_works_for_root_absolute(DeltacloudUnitTest::UrlForTest): .
test_it_works_when_given_absolute(DeltacloudUnitTest::UrlForTest): .
test_it_works_when_not_at_root_context(DeltacloudUnitTest::UrlForTest): .
test_it_works_with_spaces(DeltacloudUnitTest::UrlForTest): .

Finished in 0.891265 seconds.

   1) Failure:
test_it_can_filter_using_architecture(DeltacloudUnitTest::HardwareProfilesTest)
 
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in 
`fail_with'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in 
`fail_with_message'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in 
`__delegate_operator'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in 
`eval_match'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in 
`=='
      ./tests/drivers/mock/images_test.rb:72:in 
`test_it_can_filter_using_architecture']:
expected: 1,
      got: 0 (using ==)

   2) Failure:
test_it_can_filter_using_owner_id(DeltacloudUnitTest::HardwareProfilesTest)
 
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in 
`fail_with'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in 
`fail_with_message'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in 
`__delegate_operator'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in 
`eval_match'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in 
`=='
      ./tests/drivers/mock/images_test.rb:61:in 
`test_it_can_filter_using_owner_id']:
expected: 1,
      got: 0 (using ==)

   3) Failure:
test_it_returns_images(DeltacloudUnitTest::HardwareProfilesTest)
 
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in 
`fail_with'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in 
`fail_with_message'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:63:in 
`__delegate_operator'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in 
`eval_match'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in 
`>'
      ./tests/drivers/mock/images_test.rb:18:in `test_it_returns_images']:
expected: > 0,
      got:   0

   4) Failure:
test_inst1_has_correct_attributes(DeltacloudUnitTest::InstancesTest)
 
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in 
`fail_with'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in 
`fail_with_message'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in 
`__delegate_operator'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in 
`eval_match'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in 
`=='
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:178:in

`test_instance_attributes'
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:40:in

`test_inst1_has_correct_attributes']:
expected: true,
      got: false (using ==)

   5) Failure:
test_it_create_a_new_instance_using_image_id(DeltacloudUnitTest::InstancesTest)
 
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in 
`fail_with'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in 
`fail_with_message'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in 
`__delegate_operator'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in 
`eval_match'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in 
`=='
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:76:in

`test_it_create_a_new_instance_using_image_id']:
expected: 201,
      got: 403 (using ==)

   6) Failure:
test_it_create_a_new_instance_using_image_id_and_name(DeltacloudUnitTest::InstancesTest)
 
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in 
`fail_with'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in 
`fail_with_message'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in 
`__delegate_operator'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in 
`eval_match'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in 
`=='
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:91:in

`test_it_create_a_new_instance_using_image_id_and_name']:
expected: 201,
      got: 403 (using ==)

   7) Failure:
test_it_create_a_new_instance_using_image_id_and_name_and_hwp(DeltacloudUnitTest::InstancesTest)
 
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in 
`fail_with'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in 
`fail_with_message'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in 
`__delegate_operator'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in 
`eval_match'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in 
`=='
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:107:in

`test_it_create_a_new_instance_using_image_id_and_name_and_hwp']:
expected: 201,
      got: 403 (using ==)

   8) Failure:
test_it_responses_to_html(DeltacloudUnitTest::InstancesTest)
 
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in 
`fail_with'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in 
`fail_with_message'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in 
`__delegate_operator'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in 
`eval_match'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in 
`=='
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:62:in

`test_it_responses_to_html']:
expected: 200,
      got: 403 (using ==)

   9) Error:
test_it_responses_to_json(DeltacloudUnitTest::InstancesTest):
Sinatra::RespondTo::MissingTemplate: Sinatra::RespondTo::MissingTemplate
 
./tests/drivers/mock/../../../tests/../lib/sinatra/respond_to.rb:240:in 
`respond_to'
 
./tests/drivers/mock/../../../tests/../lib/deltacloud/helpers/application_helper.rb:112:in

`report_error'
     ./tests/drivers/mock/../../../tests/../server.rb:70
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:642:in 
`instance_eval'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:642:in 
`error_block!'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:637:in 
`each'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:637:in 
`error_block!'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:626:in 
`handle_exception!'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:606:in 
`dispatch!'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:412:in 
`call!'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:567:in 
`instance_eval'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:567:in 
`invoke'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:567:in 
`catch'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:567:in 
`invoke'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:412:in 
`call!'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:400:in 
`call'
 
./tests/drivers/mock/../../../tests/../lib/sinatra/rack_driver_select.rb:47:in 
`call'
 
./tests/drivers/mock/../../../tests/../lib/sinatra/rack_matrix_params.rb:82:in 
`call'
 
./tests/drivers/mock/../../../tests/../lib/sinatra/rack_runtime.rb:36:in 
`call'
 
./tests/drivers/mock/../../../tests/../lib/sinatra/rack_etag.rb:42:in `call'
 
/usr/lib/ruby/gems/1.8/gems/rack-accept-0.4.3/lib/rack/accept/context.rb:22:in 
`call'
 
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in 
`call'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:980:in 
`call'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1006:in 
`synchronize'
     /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:980:in 
`call'
 
/usr/lib/ruby/gems/1.8/gems/rack-test-0.5.6/lib/rack/mock_session.rb:30:in 
`request'
     /usr/lib/ruby/gems/1.8/gems/rack-test-0.5.6/lib/rack/test.rb:209:in 
`process_request'
     /usr/lib/ruby/gems/1.8/gems/rack-test-0.5.6/lib/rack/test.rb:57:in 
`get'
     ./tests/drivers/mock/../../../tests/common.rb:65:in `do_request'
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:50:in

`test_it_responses_to_json'

  10) Failure:
test_it_returns_instances(DeltacloudUnitTest::InstancesTest)
 
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in 
`fail_with'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in 
`fail_with_message'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:63:in 
`__delegate_operator'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in 
`eval_match'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in 
`>'
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:18:in

`test_it_returns_instances']:
expected: > 0,
      got:   0

  11) Failure:
test_it_returns_valid_realm(DeltacloudUnitTest::InstancesTest)
 
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in 
`fail_with'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in 
`fail_with_message'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in 
`__delegate_operator'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in 
`eval_match'
 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in 
`=='
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:178:in

`test_instance_attributes'
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:46:in

`test_it_returns_valid_realm']:
expected: true,
      got: false (using ==)

  12) Error:
test_it_z0_stop_and_start_instance(DeltacloudUnitTest::InstancesTest):
NoMethodError: undefined method `each' for nil:NilClass
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:117:in

`test_it_z0_stop_and_start_instance'

  13) Error:
test_z0_reboot_instance(DeltacloudUnitTest::InstancesTest):
NoMethodError: undefined method `each' for nil:NilClass
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:138:in

`test_z0_reboot_instance'

  14) Error:
test_z1_stop_created_instances(DeltacloudUnitTest::InstancesTest):
NoMethodError: undefined method `each' for nil:NilClass
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:151:in

`test_z1_stop_created_instances'

  15) Error:
test_z2_destroy_created_instances(DeltacloudUnitTest::InstancesTest):
NoMethodError: undefined method `each' for nil:NilClass
 
./tests/drivers/mock/../../../tests/../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/../../../tests/drivers/mock/instances_test.rb:164:in

`test_z2_destroy_created_instances'

65 tests, 0 assertions, 10 failures, 5 errors
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I"lib" 
"/home/marios/.gem/r...]

(See full trace by running task with --trace)




On 24/03/11 15:39, mfojtik@redhat.com wrote:
> Hi,
>
> This patch will enable a quick unit test for Rackspace driver.
> It tests all collections and instance creation and management.
>
> How can I run tests?
>
> 1. Edit "tests/drivers/rackspace/setup.rb" and put your Rackspace credentials here
> 2. Run: rake test:rackspace
>
> How much it will cost?
>
> With tests you launch *1* instance in Rackspace for ~1 minute and this instance will
> be destroyed with another test.
> In case this test suite fail, I recommending to look into your Rackspace account
> and destroy created instance manually.
>
> What about Mock tests?
>
> Yes, they are still here: rake test:mock
>
> PS: Additionally this patch fixing an issue I found in Rackspace driver during my work.
When you query
>      for non-existing instance id it throwed an 500 error with Exception. I replaced
it with 404, which is
>      correct HTTP code for this case.
>
>      Also I removed unnecessary call to images when you're starting new instance. Image
ID is passed throught
>      param[:image_id] and additional checking here is not needed.
>
>
>    -- Michal
>


Mime
View raw message