mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|elasticache] use Formatador for testing output
This commit is contained in:
parent
49cc699d68
commit
98e60cee19
2 changed files with 9 additions and 6 deletions
|
@ -9,17 +9,21 @@ Shindo.tests('AWS::Elasticache | cache clusters', ['aws', 'elasticache']) do
|
|||
|
||||
pending if Fog.mocking?
|
||||
|
||||
Formatador.display_line "Creating cluster #{cluster_params[:id]}..."
|
||||
model_tests(AWS[:elasticache].clusters, cluster_params, false) do
|
||||
@instance.reload # Reload to get the cluster info from AWS
|
||||
puts "Waiting for #{@instance.id} to become available (#{@instance.status})..."
|
||||
Formatador.display_line "Waiting for #{@instance.id} "+
|
||||
"to become available (#{@instance.status})..."
|
||||
@instance.wait_for {ready?}
|
||||
end
|
||||
|
||||
# Single model is still deleting, so re-randomize the cluster ID
|
||||
cluster_params[:id] = "fog-test-cluster-#{rand(999).to_s}"
|
||||
Formatador.display_line "Creating cluster #{cluster_params[:id]}..."
|
||||
collection_tests(AWS[:elasticache].clusters, cluster_params, false) do
|
||||
@instance.reload # Reload to get the cluster info from AWS
|
||||
puts "Waiting for #{@instance.id} to become available (#{@instance.status})..."
|
||||
Formatador.display_line "Waiting for #{@instance.id} "+
|
||||
"to become available (#{@instance.status})..."
|
||||
@instance.wait_for {ready?}
|
||||
end
|
||||
|
||||
|
|
|
@ -48,12 +48,11 @@ Shindo.tests('AWS::Elasticache | cache cluster requests', ['aws', 'elasticache']
|
|||
body
|
||||
end
|
||||
|
||||
puts "Waiting for cluster #{cluster_id} to become available..."
|
||||
cluster = AWS[:elasticache].clusters.find {|c| c.id == cluster_id}
|
||||
cluster.wait_for {ready?} # This doesn't work (entity disappears)
|
||||
Formatador.display_line "Waiting for cluster #{cluster_id}..."
|
||||
AWS[:elasticache].clusters.get(cluster_id).wait_for {ready?}
|
||||
|
||||
tests(
|
||||
'#delete_cache_security_group'
|
||||
'#delete_cache_clusters'
|
||||
).formats(AWS::Elasticache::Formats::CACHE_CLUSTER_RUNNING) do
|
||||
body = AWS[:elasticache].delete_cache_cluster(cluster_id).body
|
||||
# make sure this particular cluster is in the returned list
|
||||
|
|
Loading…
Add table
Reference in a new issue