-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Restructured tests and removed v1-specific ones - Updated test factories - Updated examples
- Loading branch information
Showing
18 changed files
with
152 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
def test | ||
connection = Fog::Google::SQL.new | ||
# All examples presume that you have a ~/.fog credentials file set up. | ||
# More info on it can be found here: http://fog.io/about/getting_started.html | ||
|
||
puts "Listing all Flags..." | ||
puts "--------------------" | ||
connection.flags | ||
end | ||
require "bundler" | ||
Bundler.require(:default, :development) | ||
|
||
connection = Fog::Google::SQL.new | ||
|
||
puts "Listing all Flags..." | ||
puts "--------------------" | ||
connection.flags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
def test | ||
connection = Fog::Google::SQL.new | ||
|
||
puts "Create a Instance..." | ||
puts "--------------------" | ||
instance = connection.instances.create(:name => Fog::Mock.random_letters(16), :tier => "D1") | ||
instance.wait_for { ready? } | ||
|
||
puts "Get the Instance..." | ||
puts "----------------------" | ||
connection.instances.get(instance.name) | ||
|
||
puts "List all Instances..." | ||
puts "---------------------" | ||
connection.instances.all | ||
|
||
puts "Update the Instance..." | ||
puts "----------------------" | ||
instance.settings[:activation_policy] = "ALWAYS" | ||
instance.update | ||
instance.wait_for { ready? } | ||
|
||
puts "Reset the Instance SSL configuration..." | ||
puts "---------------------------------------" | ||
instance.reset_ssl_config | ||
|
||
puts "Restart the Instance..." | ||
puts "-----------------------" | ||
instance.restart | ||
|
||
puts "Delete the Instance..." | ||
puts "----------------------" | ||
instance.destroy | ||
end | ||
# All examples presume that you have a ~/.fog credentials file set up. | ||
# More info on it can be found here: http://fog.io/about/getting_started.html | ||
|
||
require "bundler" | ||
Bundler.require(:default, :development) | ||
|
||
connection = Fog::Google::SQL.new | ||
|
||
puts "Create a Instance..." | ||
puts "--------------------" | ||
instance = connection.instances.create(:name => Fog::Mock.random_letters(16), :tier => "db-n1-standard-1") | ||
instance.wait_for { ready? } | ||
|
||
puts "Get the Instance..." | ||
puts "----------------------" | ||
connection.instances.get(instance.name) | ||
|
||
puts "List all Instances..." | ||
puts "---------------------" | ||
connection.instances.all | ||
|
||
puts "Update the Instance..." | ||
puts "----------------------" | ||
instance.settings[:activation_policy] = "ALWAYS" | ||
instance.update | ||
instance.wait_for { ready? } | ||
|
||
puts "Reset the Instance SSL configuration..." | ||
puts "---------------------------------------" | ||
instance.reset_ssl_config | ||
|
||
puts "Restart the Instance..." | ||
puts "-----------------------" | ||
instance.restart | ||
|
||
puts "Delete the Instance..." | ||
puts "----------------------" | ||
instance.destroy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
def test | ||
connection = Fog::Google::SQL.new | ||
# All examples presume that you have a ~/.fog credentials file set up. | ||
# More info on it can be found here: http://fog.io/about/getting_started.html | ||
|
||
puts "Create a Instance..." | ||
puts "--------------------" | ||
instance = connection.instances.create(:name => Fog::Mock.random_letters(16), :tier => "D1") | ||
instance.wait_for { ready? } | ||
require "bundler" | ||
Bundler.require(:default, :development) | ||
|
||
puts "Delete the Instance..." | ||
puts "----------------------" | ||
operation = instance.destroy | ||
connection = Fog::Google::SQL.new | ||
|
||
puts "Get the Operation..." | ||
puts "--------------------" | ||
connection.operations.get(operation.identity) | ||
puts "Create a Instance..." | ||
puts "--------------------" | ||
instance = connection.instances.create(:name => Fog::Mock.random_letters(16), :tier => "D1") | ||
instance.wait_for { ready? } | ||
|
||
puts "Listing all Operations..." | ||
puts "-------------------------" | ||
connection.operations.all(instance.identity) | ||
end | ||
puts "Delete the Instance..." | ||
puts "----------------------" | ||
operation = instance.destroy | ||
|
||
puts "Get the Operation..." | ||
puts "--------------------" | ||
connection.operations.get(operation.identity) | ||
|
||
puts "Listing all Operations..." | ||
puts "-------------------------" | ||
connection.operations.all(instance.identity) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
def test | ||
connection = Fog::Google::SQL.new | ||
|
||
puts "Create a Instance..." | ||
puts "--------------------" | ||
instance = connection.instances.create(:name => Fog::Mock.random_letters(16), :tier => "D1") | ||
instance.wait_for { ready? } | ||
|
||
puts "Create a SSL certificate..." | ||
puts "---------------------------" | ||
ssl_cert = connection.ssl_certs.create(:instance => instance.name, :common_name => Fog::Mock.random_letters(16)) | ||
|
||
puts "Get the SSL certificate..." | ||
puts "--------------------------" | ||
connection.ssl_certs.get(instance.name, ssl_cert.sha1_fingerprint) | ||
|
||
puts "List all SSL certificate..." | ||
puts "---------------------------" | ||
connection.ssl_certs.all(instance.name) | ||
|
||
puts "Delete the SSL certificate..." | ||
puts "-----------------------------" | ||
ssl_cert.destroy | ||
|
||
puts "Delete the Instance..." | ||
puts "----------------------" | ||
instance.destroy | ||
end | ||
# All examples presume that you have a ~/.fog credentials file set up. | ||
# More info on it can be found here: http://fog.io/about/getting_started.html | ||
|
||
require "bundler" | ||
Bundler.require(:default, :development) | ||
|
||
connection = Fog::Google::SQL.new | ||
|
||
puts "Create a Instance..." | ||
puts "--------------------" | ||
instance = connection.instances.create(:name => Fog::Mock.random_letters(16), :tier => "db-n1-standard-1") | ||
instance.wait_for { ready? } | ||
|
||
puts "Create a SSL certificate..." | ||
puts "---------------------------" | ||
ssl_cert = connection.ssl_certs.create(:instance => instance.name, :common_name => Fog::Mock.random_letters(16)) | ||
|
||
puts "Get the SSL certificate..." | ||
puts "--------------------------" | ||
connection.ssl_certs.get(instance.name, ssl_cert.sha1_fingerprint) | ||
|
||
puts "List all SSL certificate..." | ||
puts "---------------------------" | ||
connection.ssl_certs.all(instance.name) | ||
|
||
puts "Delete the SSL certificate..." | ||
puts "-----------------------------" | ||
ssl_cert.destroy | ||
|
||
puts "Delete the Instance..." | ||
puts "----------------------" | ||
instance.destroy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
def test | ||
connection = Fog::Google::SQL.new | ||
# All examples presume that you have a ~/.fog credentials file set up. | ||
# More info on it can be found here: http://fog.io/about/getting_started.html | ||
|
||
puts "Listing all Tiers..." | ||
puts "--------------------" | ||
connection.tiers | ||
end | ||
require "bundler" | ||
Bundler.require(:default, :development) | ||
|
||
connection = Fog::Google::SQL.new | ||
|
||
puts "Listing all Tiers..." | ||
puts "--------------------" | ||
connection.tiers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...gration/factories/sql_v1_certs_factory.rb → ...ntegration/factories/sql_certs_factory.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...gration/factories/sql_v1_users_factory.rb → ...ntegration/factories/sql_users_factory.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
7 changes: 4 additions & 3 deletions
7
test/integration/sql/sqlv1/test_v1_certs.rb → test/integration/sql/test_certs.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.