From 8af0ba0f5d86d1810b6b1b96f7eb75ef4ef9904a Mon Sep 17 00:00:00 2001 From: Artem Yakimenko Date: Thu, 26 Mar 2020 13:39:09 +1100 Subject: [PATCH 1/5] Remove SQLv1 CI pipeline Support for First Generation instances ended January 30, 2020 and you no longer can create First Generation instances. See: https://cloud.google.com/sql/docs/mysql/upgrade-2nd-gen --- ci/integration-pipeline.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/ci/integration-pipeline.yml b/ci/integration-pipeline.yml index 6ec0d52378..5e27936b11 100644 --- a/ci/integration-pipeline.yml +++ b/ci/integration-pipeline.yml @@ -137,29 +137,6 @@ jobs: path: fog-google-src status: failure - - name: integration-sqlv1 - serial: true - plan: - - get: fog-google-src - resource: pull-request - version: every - trigger: true - - put: pull-request - params: {path: fog-google-src, status: pending} - - - task: run-integration-tests - file: fog-google-src/ci/tasks/run-int.yml - params: - rake_task: test:sql-sqlv1 - codecov_token: {{codecov_token}} - google_project: {{google_project}} - google_json_key_data: {{google_json_key_data}} - on_failure: - put: pull-request - params: - path: fog-google-src - status: failure - - name: integration-sqlv2 serial: true plan: @@ -213,7 +190,6 @@ jobs: passed: [integration-tests-storage, integration-tests-pubsub, integration-tests-monitoring, - integration-sqlv1, integration-sqlv2, integration-compute-core_compute, integration-compute-core_networking, From 46bbd20450fe412564e9d8b0252a813446dd25c9 Mon Sep 17 00:00:00 2001 From: Artem Yakimenko Date: Thu, 26 Mar 2020 14:37:15 +1100 Subject: [PATCH 2/5] Fix an SQL rake task typo --- tasks/test.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/test.rake b/tasks/test.rake index 2fd5c0bafc..beb4c5802a 100644 --- a/tasks/test.rake +++ b/tasks/test.rake @@ -86,10 +86,10 @@ namespace :test do end desc "Run SQL API tests" - task :compute => SQL_TEST_TASKS + task :sql => SQL_TEST_TASKS desc "Run SQL API tests in parallel" - multitask :compute_parallel => SQL_TEST_TASKS + multitask :sql_parallel => SQL_TEST_TASKS Rake::TestTask.new do |t| t.name = "sql" From b53266b5efbddf500505b03e448c9d1b6f27b1ff Mon Sep 17 00:00:00 2001 From: Artem Yakimenko Date: Thu, 26 Mar 2020 16:20:58 +1100 Subject: [PATCH 3/5] Add temporary compatibility alias for CI --- tasks/test.rake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/test.rake b/tasks/test.rake index beb4c5802a..e96cccfb32 100644 --- a/tasks/test.rake +++ b/tasks/test.rake @@ -91,6 +91,10 @@ namespace :test do desc "Run SQL API tests in parallel" multitask :sql_parallel => SQL_TEST_TASKS + # TODO(temikus): Remove after v1 is renamed in pipeline + desc "Run SQL API tests - v1 compat alias" + task :"sql-sqlv2" => :sql + Rake::TestTask.new do |t| t.name = "sql" t.description = "Run SQL API tests" From 87b51f73c2c961cf0ec3db44c7879245c9b0c9d1 Mon Sep 17 00:00:00 2001 From: Artem Yakimenko Date: Thu, 26 Mar 2020 16:54:38 +1100 Subject: [PATCH 4/5] Improve InsertSSLCert operation handling Now it actually tracks the operation in progress, so we don't get Google::Apis::ClientError: operationInProgress if we try to touch the instance immediately after. --- lib/fog/google/models/sql/ssl_cert.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/fog/google/models/sql/ssl_cert.rb b/lib/fog/google/models/sql/ssl_cert.rb index 83c682080d..e7c09946e8 100644 --- a/lib/fog/google/models/sql/ssl_cert.rb +++ b/lib/fog/google/models/sql/ssl_cert.rb @@ -54,12 +54,18 @@ def reload # Creates a SSL certificate. The new certificate will not be usable until the instance is restarted. # # @raise [Fog::Errors::Error] If SSL certificate already exists - def save + def save(async: false) requires :instance, :common_name raise Fog::Errors::Error.new("Resaving an existing object may create a duplicate") if persisted? data = service.insert_ssl_cert(instance, common_name) + # data.operation.name is used here since InsertSslCert returns a + # special object, not an operation, as usual. See documentation: + # https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/sslCerts/insert#response-body + operation = Fog::Google::SQL::Operations.new(:service => service).get(data.operation.name) + operation.wait_for { ready? } unless async + merge_attributes(data.client_cert.cert_info.to_h) self.server_ca_cert = Fog::Google::SQL::SslCert.new(data.server_ca_cert.to_h) self.cert_private_key = data.client_cert.cert_private_key From d689d773c79b6f8d6bb90b7e13a4e53470b1b1f0 Mon Sep 17 00:00:00 2001 From: Artem Yakimenko Date: Thu, 26 Mar 2020 19:04:20 +1100 Subject: [PATCH 5/5] Drop support for deprecated SQLv1 - Restructured tests and removed v1-specific ones - Updated test factories - Updated examples --- examples/sql/flags.rb | 16 +++-- examples/sql/instances.rb | 72 ++++++++++--------- examples/sql/operations.rb | 36 +++++----- examples/sql/ssl_certs.rb | 60 ++++++++-------- examples/sql/tiers.rb | 16 +++-- test/helpers/integration_test_helper.rb | 7 +- ..._certs_factory.rb => sql_certs_factory.rb} | 6 +- ...es_factory.rb => sql_instances_factory.rb} | 6 +- ..._users_factory.rb => sql_users_factory.rb} | 6 +- .../factories/sql_v2_instances_factory.rb | 19 ----- test/integration/sql/sqlv1/test_coverage.rb | 6 -- .../sql/sqlv1/test_v1_instances.rb | 31 -------- .../{sqlv1/test_v1_certs.rb => test_certs.rb} | 7 +- .../sql/{sqlv1 => }/test_common_flags.rb | 0 .../sql/{sqlv1 => }/test_common_tiers.rb | 0 .../sql/{sqlv2 => }/test_coverage.rb | 2 +- ...test_v2_instances.rb => test_instances.rb} | 24 ++++++- .../{sqlv1/test_v1_users.rb => test_users.rb} | 8 +-- 18 files changed, 152 insertions(+), 170 deletions(-) rename test/integration/factories/{sql_v1_certs_factory.rb => sql_certs_factory.rb} (72%) rename test/integration/factories/{sql_v1_instances_factory.rb => sql_instances_factory.rb} (74%) rename test/integration/factories/{sql_v1_users_factory.rb => sql_users_factory.rb} (77%) delete mode 100644 test/integration/factories/sql_v2_instances_factory.rb delete mode 100644 test/integration/sql/sqlv1/test_coverage.rb delete mode 100644 test/integration/sql/sqlv1/test_v1_instances.rb rename test/integration/sql/{sqlv1/test_v1_certs.rb => test_certs.rb} (90%) rename test/integration/sql/{sqlv1 => }/test_common_flags.rb (100%) rename test/integration/sql/{sqlv1 => }/test_common_tiers.rb (100%) rename test/integration/sql/{sqlv2 => }/test_coverage.rb (80%) rename test/integration/sql/{sqlv2/test_v2_instances.rb => test_instances.rb} (80%) rename test/integration/sql/{sqlv1/test_v1_users.rb => test_users.rb} (81%) diff --git a/examples/sql/flags.rb b/examples/sql/flags.rb index 96e7d7351b..e8f6e51109 100644 --- a/examples/sql/flags.rb +++ b/examples/sql/flags.rb @@ -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 diff --git a/examples/sql/instances.rb b/examples/sql/instances.rb index 04e79e653e..5f30b14b02 100644 --- a/examples/sql/instances.rb +++ b/examples/sql/instances.rb @@ -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 diff --git a/examples/sql/operations.rb b/examples/sql/operations.rb index 3bb47a4593..ab1e468620 100644 --- a/examples/sql/operations.rb +++ b/examples/sql/operations.rb @@ -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) diff --git a/examples/sql/ssl_certs.rb b/examples/sql/ssl_certs.rb index fa79367245..ce3679649c 100644 --- a/examples/sql/ssl_certs.rb +++ b/examples/sql/ssl_certs.rb @@ -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 diff --git a/examples/sql/tiers.rb b/examples/sql/tiers.rb index f117f51e1b..4517bc7166 100644 --- a/examples/sql/tiers.rb +++ b/examples/sql/tiers.rb @@ -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 diff --git a/test/helpers/integration_test_helper.rb b/test/helpers/integration_test_helper.rb index dea2fc84fe..674d4a8adf 100644 --- a/test/helpers/integration_test_helper.rb +++ b/test/helpers/integration_test_helper.rb @@ -24,11 +24,8 @@ # The image was created like so: https://cloud.google.com/compute/docs/images#export_an_image_to_google_cloud_storage TEST_RAW_DISK_SOURCE = "http://storage.googleapis.com/fog-test-bucket/fog-test-raw-disk-source.image.tar.gz".freeze -TEST_SQL_TIER_FIRST = "D1".freeze -TEST_SQL_REGION_FIRST = "us-central".freeze - -TEST_SQL_TIER_SECOND = "db-n1-standard-1".freeze -TEST_SQL_REGION_SECOND = TEST_REGION +TEST_SQL_TIER = "db-n1-standard-1".freeze +TEST_SQL_REGION = TEST_REGION # Test certificate/key for SSL Proxy tests, generated via: # $ openssl genrsa -out example.key 2048 diff --git a/test/integration/factories/sql_v1_certs_factory.rb b/test/integration/factories/sql_certs_factory.rb similarity index 72% rename from test/integration/factories/sql_v1_certs_factory.rb rename to test/integration/factories/sql_certs_factory.rb index b29fcc6541..b7994506c2 100644 --- a/test/integration/factories/sql_v1_certs_factory.rb +++ b/test/integration/factories/sql_certs_factory.rb @@ -1,9 +1,9 @@ require "integration/factories/collection_factory" -require "integration/factories/sql_v1_instances_factory" +require "integration/factories/sql_instances_factory" -class SqlV1CertsFactory < CollectionFactory +class SqlCertsFactory < CollectionFactory def initialize(example) - @instances = SqlV1InstancesFactory.new(example) + @instances = SqlInstancesFactory.new(example) super(Fog::Google[:sql].ssl_certs, example) end diff --git a/test/integration/factories/sql_v1_instances_factory.rb b/test/integration/factories/sql_instances_factory.rb similarity index 74% rename from test/integration/factories/sql_v1_instances_factory.rb rename to test/integration/factories/sql_instances_factory.rb index 9d82cbaa15..faebbea811 100644 --- a/test/integration/factories/sql_v1_instances_factory.rb +++ b/test/integration/factories/sql_instances_factory.rb @@ -1,6 +1,6 @@ require "integration/factories/collection_factory" -class SqlV1InstancesFactory < CollectionFactory +class SqlInstancesFactory < CollectionFactory def initialize(example) super(Fog::Google[:sql].instances, example) end @@ -13,7 +13,7 @@ def params # Name has a time suffix due to SQL resources API objects having # a _very_ long life on the backend (n(days)) after deletion. { :name => "#{resource_name}-#{Time.now.to_i}", - :region => TEST_SQL_REGION_FIRST, - :tier => TEST_SQL_TIER_FIRST } + :region => TEST_SQL_REGION, + :tier => TEST_SQL_TIER } end end diff --git a/test/integration/factories/sql_v1_users_factory.rb b/test/integration/factories/sql_users_factory.rb similarity index 77% rename from test/integration/factories/sql_v1_users_factory.rb rename to test/integration/factories/sql_users_factory.rb index 21e8b08637..d00510489a 100644 --- a/test/integration/factories/sql_v1_users_factory.rb +++ b/test/integration/factories/sql_users_factory.rb @@ -1,9 +1,9 @@ require "integration/factories/collection_factory" -require "integration/factories/sql_v1_instances_factory" +require "integration/factories/sql_instances_factory" -class SqlV1UsersFactory < CollectionFactory +class SqlUsersFactory < CollectionFactory def initialize(example) - @instances = SqlV1InstancesFactory.new(example) + @instances = SqlInstancesFactory.new(example) super(Fog::Google[:sql].users, example) end diff --git a/test/integration/factories/sql_v2_instances_factory.rb b/test/integration/factories/sql_v2_instances_factory.rb deleted file mode 100644 index 3ed129e7c9..0000000000 --- a/test/integration/factories/sql_v2_instances_factory.rb +++ /dev/null @@ -1,19 +0,0 @@ -require "integration/factories/collection_factory" - -class SqlV2InstancesFactory < CollectionFactory - def initialize(example) - super(Fog::Google[:sql].instances, example) - end - - def cleanup - super - end - - def params - # Name has a time suffix due to SQL resources API objects having - # a _very_ long life on the backend (n(days)) after deletion. - { :name => "#{resource_name}-#{Time.now.to_i}", - :region => TEST_SQL_REGION_SECOND, - :tier => TEST_SQL_TIER_SECOND } - end -end diff --git a/test/integration/sql/sqlv1/test_coverage.rb b/test/integration/sql/sqlv1/test_coverage.rb deleted file mode 100644 index 5909322722..0000000000 --- a/test/integration/sql/sqlv1/test_coverage.rb +++ /dev/null @@ -1,6 +0,0 @@ -require "helpers/integration_test_helper" - -# This is a simple coverage helper that helps differentiate -# the tests when run in parallel so the final coverage report -# can be properly combined together from multiple runners -SimpleCov.command_name "test:sqlv1" if ENV["COVERAGE"] diff --git a/test/integration/sql/sqlv1/test_v1_instances.rb b/test/integration/sql/sqlv1/test_v1_instances.rb deleted file mode 100644 index 01e02c7b22..0000000000 --- a/test/integration/sql/sqlv1/test_v1_instances.rb +++ /dev/null @@ -1,31 +0,0 @@ -require "helpers/integration_test_helper" -require "integration/factories/sql_v1_instances_factory" - -class TestSQLV1Instances < FogIntegrationTest - include TestCollection - - def setup - @subject = Fog::Google[:sql].instances - @factory = SqlV1InstancesFactory.new(namespaced_name) - end - - def test_update - instance = @factory.create - - settings_version = instance.settings_version - labels = { - :foo => "bar" - } - instance.settings[:user_labels] = labels - instance.save - - updated = @subject.get(instance.name) - assert_equal(labels, updated.settings[:user_labels]) - assert_operator(updated.settings_version, :>, settings_version) - end - - def test_default_settings - instance = @factory.create - assert_equal([], instance.ssl_certs, "new instance should have 0 initial ssl certs") - end -end diff --git a/test/integration/sql/sqlv1/test_v1_certs.rb b/test/integration/sql/test_certs.rb similarity index 90% rename from test/integration/sql/sqlv1/test_v1_certs.rb rename to test/integration/sql/test_certs.rb index 0184311831..bbc9c115da 100644 --- a/test/integration/sql/sqlv1/test_v1_certs.rb +++ b/test/integration/sql/test_certs.rb @@ -1,12 +1,13 @@ require "helpers/integration_test_helper" -require "integration/factories/sql_v1_certs_factory" +require "integration/factories/sql_certs_factory" +require "pry" -class TestSQLV1Certs < FogIntegrationTest +class TestSQLCerts < FogIntegrationTest # This test doesn't include TestCollection as certs are not an independent resource. def setup @subject = Fog::Google[:sql].ssl_certs - @factory = SqlV1CertsFactory.new(namespaced_name) + @factory = SqlCertsFactory.new(namespaced_name) @client = Fog::Google::SQL.new end diff --git a/test/integration/sql/sqlv1/test_common_flags.rb b/test/integration/sql/test_common_flags.rb similarity index 100% rename from test/integration/sql/sqlv1/test_common_flags.rb rename to test/integration/sql/test_common_flags.rb diff --git a/test/integration/sql/sqlv1/test_common_tiers.rb b/test/integration/sql/test_common_tiers.rb similarity index 100% rename from test/integration/sql/sqlv1/test_common_tiers.rb rename to test/integration/sql/test_common_tiers.rb diff --git a/test/integration/sql/sqlv2/test_coverage.rb b/test/integration/sql/test_coverage.rb similarity index 80% rename from test/integration/sql/sqlv2/test_coverage.rb rename to test/integration/sql/test_coverage.rb index ca15ff85ab..75f3978515 100644 --- a/test/integration/sql/sqlv2/test_coverage.rb +++ b/test/integration/sql/test_coverage.rb @@ -3,4 +3,4 @@ # This is a simple coverage helper that helps differentiate # the tests when run in parallel so the final coverage report # can be properly combined together from multiple runners -SimpleCov.command_name "test:sqlv2" if ENV["COVERAGE"] +SimpleCov.command_name "test:sql" if ENV["COVERAGE"] diff --git a/test/integration/sql/sqlv2/test_v2_instances.rb b/test/integration/sql/test_instances.rb similarity index 80% rename from test/integration/sql/sqlv2/test_v2_instances.rb rename to test/integration/sql/test_instances.rb index 5da6a1c196..68542ef357 100644 --- a/test/integration/sql/sqlv2/test_v2_instances.rb +++ b/test/integration/sql/test_instances.rb @@ -1,5 +1,5 @@ require "helpers/integration_test_helper" -require "integration/factories/sql_v2_instances_factory" +require "integration/factories/sql_instances_factory" # Client helper is imported for `wait_until_complete` # TODO: Remove when fog-google#339 or fog-google#340 is resolved require "helpers/client_helper" @@ -12,13 +12,33 @@ class TestSQLV2Instances < FogIntegrationTest def setup @subject = Fog::Google[:sql].instances - @factory = SqlV2InstancesFactory.new(namespaced_name) + @factory = SqlInstancesFactory.new(namespaced_name) @backup_runs = Fog::Google[:sql].backup_runs # TODO: Remove after BackupRuns get save/reload - fog-google#339 # See https://github.com/fog/fog-google/issues/339 @client = Fog::Google::SQL.new end + def test_update + instance = @factory.create + + settings_version = instance.settings_version + labels = { + :foo => "bar" + } + instance.settings[:user_labels] = labels + instance.save + + updated = @subject.get(instance.name) + assert_equal(labels, updated.settings[:user_labels]) + assert_operator(updated.settings_version, :>, settings_version) + end + + def test_default_settings + instance = @factory.create + assert_equal([], instance.ssl_certs, "new instance should have 0 initial ssl certs") + end + def test_restore_backup_run instance = @factory.create diff --git a/test/integration/sql/sqlv1/test_v1_users.rb b/test/integration/sql/test_users.rb similarity index 81% rename from test/integration/sql/sqlv1/test_v1_users.rb rename to test/integration/sql/test_users.rb index 20ec42c753..7b6acdc27a 100644 --- a/test/integration/sql/sqlv1/test_v1_users.rb +++ b/test/integration/sql/test_users.rb @@ -1,8 +1,8 @@ require "helpers/integration_test_helper" -require "integration/factories/sql_v1_instances_factory" -require "integration/factories/sql_v1_users_factory" +require "integration/factories/sql_instances_factory" +require "integration/factories/sql_users_factory" -class TestSQLV1Users < FogIntegrationTest +class TestSQLUsers < FogIntegrationTest # This test doesn't include TestCollection as Users is not a # classical Fog model, as it's tied to a particular instance # I.e.: @@ -12,7 +12,7 @@ class TestSQLV1Users < FogIntegrationTest def setup @subject = Fog::Google[:sql].users - @factory = SqlV1UsersFactory.new(namespaced_name) + @factory = SqlUsersFactory.new(namespaced_name) end def teardown