mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
correct issues in previous commit
This commit is contained in:
parent
3532335485
commit
bba30d0244
4 changed files with 5 additions and 12 deletions
|
@ -1,5 +1,3 @@
|
|||
require 'rubygems'
|
||||
require 'fog'
|
||||
def test
|
||||
connection = Fog::Compute.new({ :provider => "Google" })
|
||||
|
||||
|
@ -18,6 +16,8 @@ def test
|
|||
:name => "fog-smoke-test-#{Time.now.to_i}",
|
||||
:disks => [disk],
|
||||
:machine_type => "n1-standard-1",
|
||||
:private_key_path => File.expand_path("~/.ssh/id_rsa"),
|
||||
:public_key_path => File.expand_path("~/.ssh/id_rsa.pub"),
|
||||
:zone_name => "us-central1-a",
|
||||
:user => ENV['USER'],
|
||||
:tags => ["fog"]
|
||||
|
@ -47,4 +47,3 @@ def test
|
|||
raise "Could not bootstrap sshable server." unless server.ssh("whoami")
|
||||
raise "Could not delete server." unless server.destroy
|
||||
end
|
||||
test
|
||||
|
|
|
@ -1,21 +1,17 @@
|
|||
require 'pry-nav'
|
||||
require 'rubygems'
|
||||
require 'fog'
|
||||
def test
|
||||
connection = Fog::Compute.new({ :provider => "Google" })
|
||||
|
||||
rawdisk = {
|
||||
:source => 'https://www.googleapis.com/compute/v1/projects/graphite-demos/zones/us-central1-a/disks/fog-smoke-test-1406777369', # 'http://some_valid_url_to_rootfs_tarball'
|
||||
:source => nil, # 'http://some_valid_url_to_rootfs_tarball'
|
||||
:container_type => 'TAR',
|
||||
}
|
||||
|
||||
# Can't test this unless the 'source' points to a valid URL
|
||||
return if rawdisk[:source].nil?
|
||||
binding.pry
|
||||
|
||||
img = connection.images.create(:name => 'test-image',
|
||||
:description => 'Test image (via fog)',
|
||||
:raw_disk => rawdisk)
|
||||
|
||||
img.reload # will raise if image was not saved correctly
|
||||
end
|
||||
test
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
def model_tests(collection, params = {}, mocks_implemented = true)
|
||||
tests('success') do
|
||||
|
||||
|
@ -17,6 +16,7 @@ def model_tests(collection, params = {}, mocks_implemented = true)
|
|||
pending if Fog.mocking? && !mocks_implemented
|
||||
@instance.destroy
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
ENV['FOG_MOCK'] ||= 'true'
|
||||
ENV['AUTOTEST'] = 'true'
|
||||
ENV['WATCHR'] = '1'
|
||||
require 'pry-nav'
|
||||
|
||||
def file2shindo(file)
|
||||
result = file.sub('lib/fog/', 'tests/').gsub(/\.rb$/, '_tests.rb')
|
||||
end
|
||||
|
||||
def run_shindo_test(file)
|
||||
binding.pry
|
||||
if File.exist? file
|
||||
system("shindont #{file}")
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue