mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
d48d376e9c
* take the liberty of correcting Aws naming
30 lines
1.2 KiB
Ruby
30 lines
1.2 KiB
Ruby
Shindo.tests('Aws::Elasticache | cache clusters', ['aws', 'elasticache']) do
|
|
cluster_params = {
|
|
:id => "fog-test-cluster-#{rand(999).to_s}",
|
|
:node_type => 'cache.m1.large',
|
|
:security_groups => ['default'],
|
|
:engine => 'memcached',
|
|
:num_nodes => 1
|
|
}
|
|
|
|
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
|
|
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
|
|
Formatador.display_line "Waiting for #{@instance.id} "+
|
|
"to become available (#{@instance.status})..."
|
|
@instance.wait_for {ready?}
|
|
end
|
|
|
|
end
|