1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/digitalocean/models/compute/servers_tests.rb
Paul Thornthwaite 6379514e6a [DigitalOcean] Skip consistently timing out tests
The server tests in digital ocean have been frequently timing out.

* https://travis-ci.org/fog/fog/jobs/20605301#L1030
* https://travis-ci.org/fog/fog/jobs/19765753#L1233
...and many more

Each timeout run wastes Travis resources and the time of the people who
have to check why their unrelated changes are failed.

We've even become so complacent about it, standard practice is to just
comment and merge.

So I'm disabling the tests until someone fixes it or we replace the
server tests with a cleaner approach, whichever comes first.
2014-03-12 17:41:58 +00:00

39 lines
1.3 KiB
Ruby

Shindo.tests('Fog::Compute[:digitalocean] | servers collection', ['digitalocean']) do
service = Fog::Compute[:digitalocean]
options = {
:name => "#{fog_server_name}-#{Time.now.to_i.to_s}"
}.merge fog_test_server_attributes
public_key_path = File.join(File.dirname(__FILE__), '../../fixtures/id_rsa.pub')
private_key_path = File.join(File.dirname(__FILE__), '../../fixtures/id_rsa')
# Collection tests are consistently timing out on Travis wasting people's time and resources
pending if Fog.mocking?
collection_tests(service.servers, options, true) do
@instance.wait_for { ready? }
end
tests("#bootstrap with public/private_key_path").succeeds do
pending if Fog.mocking?
@server = service.servers.bootstrap({
:public_key_path => public_key_path,
:private_key_path => private_key_path
}.merge(options))
@server.destroy
end
tests("#bootstrap with public/private_key").succeeds do
pending if Fog.mocking?
@server = service.servers.bootstrap({
:public_key => File.read(public_key_path),
:private_key => File.read(private_key_path)
}.merge(options))
@server.destroy
end
tests("#bootstrap with no public/private keys") do
raises(ArgumentError, 'raises ArgumentError') { service.servers.bootstrap(options) }
end
end