1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[brightbox] Test and fix for API client secret reset

* Wasn't loaded although code in place
* Test format and check output isn't nil
This commit is contained in:
Paul Thornthwaite 2011-09-29 10:17:00 +01:00
parent e418c6540e
commit 254123791b
2 changed files with 8 additions and 0 deletions

View file

@ -85,6 +85,7 @@ module Fog
request :remove_nodes_load_balancer
request :remove_servers_server_group
request :reset_ftp_password_account
request :reset_secret_api_client
request :resize_server
request :shutdown_server
request :snapshot_server

View file

@ -33,6 +33,13 @@ Shindo.tests('Fog::Compute[:brightbox] | api client requests', ['brightbox']) do
formats(Brightbox::Compute::Formats::Full::API_CLIENT) { result }
end
tests("#reset_secret_api_client('#{@api_client_id}')") do
pending if Fog.mocking?
result = Fog::Compute[:brightbox].reset_secret_api_client(@api_client_id)
formats(Brightbox::Compute::Formats::Full::API_CLIENT) { result }
test("new secret is visible") { ! result["secret"].nil? }
end
tests("#destroy_api_client('#{@api_client_id}')") do
pending if Fog.mocking?
result = Fog::Compute[:brightbox].destroy_api_client(@api_client_id)