fog-google 1.9.1 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +40 -0
- data/README.md +1 -1
- data/SECURITY.md +16 -0
- data/ci/README.md +3 -2
- data/ci/build-head-pipeline.yml +173 -0
- data/ci/{pipeline.yml → integration-pipeline.yml} +0 -24
- data/ci/pipeline-dev.yml +58 -0
- data/ci/tasks/run-int.sh +20 -1
- data/ci/tasks/run-int.yml +2 -0
- data/examples/sql/flags.rb +10 -6
- data/examples/sql/instances.rb +38 -34
- data/examples/sql/operations.rb +20 -16
- data/examples/sql/ssl_certs.rb +32 -28
- data/examples/sql/tiers.rb +10 -6
- data/fog-google.gemspec +1 -1
- data/lib/fog/compute/google.rb +4 -0
- data/lib/fog/compute/google/mock.rb +2 -1
- data/lib/fog/compute/google/models/address.rb +15 -2
- data/lib/fog/compute/google/models/disk.rb +6 -2
- data/lib/fog/compute/google/models/images.rb +6 -1
- data/lib/fog/compute/google/models/instance_groups.rb +2 -2
- data/lib/fog/compute/google/models/server.rb +30 -6
- data/lib/fog/compute/google/real.rb +2 -1
- data/lib/fog/compute/google/requests/abandon_instances.rb +2 -0
- data/lib/fog/compute/google/requests/add_backend_service_backends.rb +2 -0
- data/lib/fog/compute/google/requests/add_instance_group_instances.rb +2 -0
- data/lib/fog/compute/google/requests/add_server_access_config.rb +2 -0
- data/lib/fog/compute/google/requests/add_target_pool_health_checks.rb +2 -0
- data/lib/fog/compute/google/requests/add_target_pool_instances.rb +2 -0
- data/lib/fog/compute/google/requests/attach_disk.rb +2 -0
- data/lib/fog/compute/google/requests/create_disk_snapshot.rb +2 -0
- data/lib/fog/compute/google/requests/delete_address.rb +2 -0
- data/lib/fog/compute/google/requests/delete_backend_service.rb +2 -0
- data/lib/fog/compute/google/requests/delete_disk.rb +2 -0
- data/lib/fog/compute/google/requests/delete_firewall.rb +2 -0
- data/lib/fog/compute/google/requests/delete_forwarding_rule.rb +2 -0
- data/lib/fog/compute/google/requests/delete_global_address.rb +2 -0
- data/lib/fog/compute/google/requests/delete_global_forwarding_rule.rb +2 -0
- data/lib/fog/compute/google/requests/delete_global_operation.rb +2 -0
- data/lib/fog/compute/google/requests/delete_http_health_check.rb +2 -0
- data/lib/fog/compute/google/requests/delete_image.rb +2 -0
- data/lib/fog/compute/google/requests/delete_instance_group.rb +2 -0
- data/lib/fog/compute/google/requests/delete_instance_group_manager.rb +2 -0
- data/lib/fog/compute/google/requests/delete_instance_template.rb +2 -0
- data/lib/fog/compute/google/requests/delete_network.rb +2 -0
- data/lib/fog/compute/google/requests/delete_region_operation.rb +2 -0
- data/lib/fog/compute/google/requests/delete_route.rb +2 -0
- data/lib/fog/compute/google/requests/delete_server.rb +2 -0
- data/lib/fog/compute/google/requests/delete_server_access_config.rb +2 -0
- data/lib/fog/compute/google/requests/delete_snapshot.rb +2 -0
- data/lib/fog/compute/google/requests/delete_ssl_certificate.rb +2 -0
- data/lib/fog/compute/google/requests/delete_subnetwork.rb +2 -0
- data/lib/fog/compute/google/requests/delete_target_http_proxy.rb +2 -0
- data/lib/fog/compute/google/requests/delete_target_https_proxy.rb +2 -0
- data/lib/fog/compute/google/requests/delete_target_instance.rb +2 -0
- data/lib/fog/compute/google/requests/delete_target_pool.rb +2 -0
- data/lib/fog/compute/google/requests/delete_url_map.rb +2 -0
- data/lib/fog/compute/google/requests/delete_zone_operation.rb +2 -0
- data/lib/fog/compute/google/requests/deprecate_image.rb +2 -0
- data/lib/fog/compute/google/requests/detach_disk.rb +2 -0
- data/lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb +2 -0
- data/lib/fog/compute/google/requests/get_address.rb +2 -0
- data/lib/fog/compute/google/requests/get_backend_service_health.rb +2 -0
- data/lib/fog/compute/google/requests/get_disk.rb +2 -0
- data/lib/fog/compute/google/requests/get_disk_type.rb +2 -0
- data/lib/fog/compute/google/requests/get_firewall.rb +2 -0
- data/lib/fog/compute/google/requests/get_forwarding_rule.rb +2 -0
- data/lib/fog/compute/google/requests/get_global_address.rb +2 -0
- data/lib/fog/compute/google/requests/get_global_forwarding_rule.rb +2 -0
- data/lib/fog/compute/google/requests/get_global_operation.rb +2 -0
- data/lib/fog/compute/google/requests/get_http_health_check.rb +2 -0
- data/lib/fog/compute/google/requests/get_image.rb +2 -0
- data/lib/fog/compute/google/requests/get_image_from_family.rb +2 -0
- data/lib/fog/compute/google/requests/get_instance_group.rb +2 -0
- data/lib/fog/compute/google/requests/get_instance_group_manager.rb +2 -0
- data/lib/fog/compute/google/requests/get_instance_template.rb +2 -0
- data/lib/fog/compute/google/requests/get_machine_type.rb +2 -0
- data/lib/fog/compute/google/requests/get_network.rb +2 -0
- data/lib/fog/compute/google/requests/get_project.rb +2 -0
- data/lib/fog/compute/google/requests/get_region.rb +2 -0
- data/lib/fog/compute/google/requests/get_route.rb +2 -0
- data/lib/fog/compute/google/requests/get_server.rb +2 -0
- data/lib/fog/compute/google/requests/get_server_serial_port_output.rb +2 -0
- data/lib/fog/compute/google/requests/get_snapshot.rb +2 -0
- data/lib/fog/compute/google/requests/get_ssl_certificate.rb +2 -0
- data/lib/fog/compute/google/requests/get_subnetwork.rb +2 -0
- data/lib/fog/compute/google/requests/get_target_http_proxy.rb +2 -0
- data/lib/fog/compute/google/requests/get_target_https_proxy.rb +2 -0
- data/lib/fog/compute/google/requests/get_target_instance.rb +2 -0
- data/lib/fog/compute/google/requests/get_target_pool.rb +2 -0
- data/lib/fog/compute/google/requests/get_target_pool_health.rb +2 -0
- data/lib/fog/compute/google/requests/get_url_map.rb +2 -0
- data/lib/fog/compute/google/requests/get_zone.rb +2 -0
- data/lib/fog/compute/google/requests/get_zone_operation.rb +2 -0
- data/lib/fog/compute/google/requests/insert_address.rb +2 -0
- data/lib/fog/compute/google/requests/insert_backend_service.rb +2 -0
- data/lib/fog/compute/google/requests/insert_disk.rb +8 -5
- data/lib/fog/compute/google/requests/insert_firewall.rb +2 -0
- data/lib/fog/compute/google/requests/insert_forwarding_rule.rb +2 -0
- data/lib/fog/compute/google/requests/insert_global_address.rb +2 -0
- data/lib/fog/compute/google/requests/insert_global_forwarding_rule.rb +2 -0
- data/lib/fog/compute/google/requests/insert_http_health_check.rb +2 -0
- data/lib/fog/compute/google/requests/insert_image.rb +2 -0
- data/lib/fog/compute/google/requests/insert_instance_group.rb +2 -0
- data/lib/fog/compute/google/requests/insert_instance_group_manager.rb +2 -0
- data/lib/fog/compute/google/requests/insert_instance_template.rb +2 -0
- data/lib/fog/compute/google/requests/insert_network.rb +2 -0
- data/lib/fog/compute/google/requests/insert_route.rb +2 -0
- data/lib/fog/compute/google/requests/insert_server.rb +2 -0
- data/lib/fog/compute/google/requests/insert_ssl_certificate.rb +2 -0
- data/lib/fog/compute/google/requests/insert_subnetwork.rb +2 -0
- data/lib/fog/compute/google/requests/insert_target_http_proxy.rb +2 -0
- data/lib/fog/compute/google/requests/insert_target_https_proxy.rb +2 -0
- data/lib/fog/compute/google/requests/insert_target_instance.rb +2 -0
- data/lib/fog/compute/google/requests/insert_target_pool.rb +2 -0
- data/lib/fog/compute/google/requests/insert_url_map.rb +2 -0
- data/lib/fog/compute/google/requests/invalidate_url_map_cache.rb +2 -0
- data/lib/fog/compute/google/requests/list_addresses.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_addresses.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_disk_types.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_disks.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_forwarding_rules.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_instance_group_managers.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_instance_groups.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_machine_types.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_servers.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_subnetworks.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_target_instances.rb +2 -0
- data/lib/fog/compute/google/requests/list_aggregated_target_pools.rb +2 -0
- data/lib/fog/compute/google/requests/list_disk_types.rb +2 -0
- data/lib/fog/compute/google/requests/list_disks.rb +2 -0
- data/lib/fog/compute/google/requests/list_firewalls.rb +2 -0
- data/lib/fog/compute/google/requests/list_forwarding_rules.rb +2 -0
- data/lib/fog/compute/google/requests/list_global_addresses.rb +2 -0
- data/lib/fog/compute/google/requests/list_global_forwarding_rules.rb +2 -0
- data/lib/fog/compute/google/requests/list_global_operations.rb +2 -0
- data/lib/fog/compute/google/requests/list_http_health_checks.rb +2 -0
- data/lib/fog/compute/google/requests/list_images.rb +2 -0
- data/lib/fog/compute/google/requests/list_instance_group_instances.rb +2 -0
- data/lib/fog/compute/google/requests/list_instance_group_managers.rb +2 -0
- data/lib/fog/compute/google/requests/list_instance_groups.rb +2 -0
- data/lib/fog/compute/google/requests/list_instance_templates.rb +2 -0
- data/lib/fog/compute/google/requests/list_machine_types.rb +2 -0
- data/lib/fog/compute/google/requests/list_networks.rb +2 -0
- data/lib/fog/compute/google/requests/list_region_operations.rb +2 -0
- data/lib/fog/compute/google/requests/list_regions.rb +2 -0
- data/lib/fog/compute/google/requests/list_routes.rb +2 -0
- data/lib/fog/compute/google/requests/list_servers.rb +2 -0
- data/lib/fog/compute/google/requests/list_snapshots.rb +2 -0
- data/lib/fog/compute/google/requests/list_ssl_certificates.rb +2 -0
- data/lib/fog/compute/google/requests/list_subnetworks.rb +2 -0
- data/lib/fog/compute/google/requests/list_target_http_proxies.rb +2 -0
- data/lib/fog/compute/google/requests/list_target_https_proxies.rb +2 -0
- data/lib/fog/compute/google/requests/list_target_instances.rb +2 -0
- data/lib/fog/compute/google/requests/list_target_pools.rb +2 -0
- data/lib/fog/compute/google/requests/list_url_maps.rb +2 -0
- data/lib/fog/compute/google/requests/list_zone_operations.rb +2 -0
- data/lib/fog/compute/google/requests/list_zones.rb +2 -0
- data/lib/fog/compute/google/requests/patch_firewall.rb +2 -0
- data/lib/fog/compute/google/requests/patch_url_map.rb +2 -0
- data/lib/fog/compute/google/requests/recreate_instances.rb +2 -0
- data/lib/fog/compute/google/requests/remove_instance_group_instances.rb +2 -0
- data/lib/fog/compute/google/requests/remove_target_pool_health_checks.rb +2 -0
- data/lib/fog/compute/google/requests/remove_target_pool_instance.rb +2 -0
- data/lib/fog/compute/google/requests/remove_target_pool_instances.rb +2 -0
- data/lib/fog/compute/google/requests/reset_server.rb +2 -0
- data/lib/fog/compute/google/requests/reset_windows_password.rb +154 -0
- data/lib/fog/compute/google/requests/set_common_instance_metadata.rb +2 -0
- data/lib/fog/compute/google/requests/set_forwarding_rule_target.rb +2 -0
- data/lib/fog/compute/google/requests/set_global_forwarding_rule_target.rb +2 -0
- data/lib/fog/compute/google/requests/set_instance_template.rb +2 -0
- data/lib/fog/compute/google/requests/set_server_disk_auto_delete.rb +2 -0
- data/lib/fog/compute/google/requests/set_server_machine_type.rb +23 -0
- data/lib/fog/compute/google/requests/set_server_metadata.rb +2 -0
- data/lib/fog/compute/google/requests/set_server_scheduling.rb +2 -0
- data/lib/fog/compute/google/requests/set_server_tags.rb +2 -0
- data/lib/fog/compute/google/requests/set_snapshot_labels.rb +2 -0
- data/lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb +2 -0
- data/lib/fog/compute/google/requests/set_target_http_proxy_url_map.rb +2 -0
- data/lib/fog/compute/google/requests/set_target_https_proxy_ssl_certificates.rb +2 -0
- data/lib/fog/compute/google/requests/set_target_https_proxy_url_map.rb +2 -0
- data/lib/fog/compute/google/requests/set_target_pool_backup.rb +2 -0
- data/lib/fog/compute/google/requests/start_server.rb +2 -0
- data/lib/fog/compute/google/requests/stop_server.rb +2 -0
- data/lib/fog/compute/google/requests/update_firewall.rb +2 -0
- data/lib/fog/compute/google/requests/update_http_health_check.rb +2 -0
- data/lib/fog/compute/google/requests/update_url_map.rb +2 -0
- data/lib/fog/compute/google/requests/validate_url_map.rb +2 -0
- data/lib/fog/dns/google/requests/create_change.rb +2 -0
- data/lib/fog/dns/google/requests/create_managed_zone.rb +2 -0
- data/lib/fog/dns/google/requests/delete_managed_zone.rb +2 -0
- data/lib/fog/dns/google/requests/get_change.rb +2 -0
- data/lib/fog/dns/google/requests/get_managed_zone.rb +2 -0
- data/lib/fog/dns/google/requests/get_project.rb +2 -0
- data/lib/fog/dns/google/requests/list_changes.rb +2 -0
- data/lib/fog/dns/google/requests/list_managed_zones.rb +2 -0
- data/lib/fog/dns/google/requests/list_resource_record_sets.rb +2 -0
- data/lib/fog/google/models/sql/ssl_cert.rb +7 -1
- data/lib/fog/google/models/sql/user.rb +2 -0
- data/lib/fog/google/requests/monitoring/create_metric_descriptor.rb +2 -0
- data/lib/fog/google/requests/monitoring/create_timeseries.rb +3 -1
- data/lib/fog/google/requests/monitoring/delete_metric_descriptor.rb +2 -0
- data/lib/fog/google/requests/monitoring/get_metric_descriptor.rb +2 -0
- data/lib/fog/google/requests/monitoring/list_monitored_resource_descriptors.rb +2 -0
- data/lib/fog/google/requests/monitoring/list_timeseries.rb +2 -0
- data/lib/fog/google/requests/sql/clone_instance.rb +2 -0
- data/lib/fog/google/requests/sql/delete_backup_run.rb +2 -0
- data/lib/fog/google/requests/sql/delete_instance.rb +2 -0
- data/lib/fog/google/requests/sql/delete_ssl_cert.rb +2 -0
- data/lib/fog/google/requests/sql/delete_user.rb +2 -0
- data/lib/fog/google/requests/sql/export_instance.rb +2 -0
- data/lib/fog/google/requests/sql/get_backup_run.rb +2 -0
- data/lib/fog/google/requests/sql/get_instance.rb +2 -0
- data/lib/fog/google/requests/sql/get_operation.rb +2 -0
- data/lib/fog/google/requests/sql/get_ssl_cert.rb +2 -0
- data/lib/fog/google/requests/sql/import_instance.rb +2 -0
- data/lib/fog/google/requests/sql/insert_backup_run.rb +2 -0
- data/lib/fog/google/requests/sql/insert_instance.rb +2 -0
- data/lib/fog/google/requests/sql/insert_ssl_cert.rb +2 -0
- data/lib/fog/google/requests/sql/insert_user.rb +2 -0
- data/lib/fog/google/requests/sql/list_backup_runs.rb +2 -0
- data/lib/fog/google/requests/sql/list_flags.rb +2 -0
- data/lib/fog/google/requests/sql/list_instances.rb +2 -0
- data/lib/fog/google/requests/sql/list_operations.rb +2 -0
- data/lib/fog/google/requests/sql/list_ssl_certs.rb +2 -0
- data/lib/fog/google/requests/sql/list_tiers.rb +2 -0
- data/lib/fog/google/requests/sql/list_users.rb +2 -0
- data/lib/fog/google/requests/sql/reset_instance_ssl_config.rb +2 -0
- data/lib/fog/google/requests/sql/restart_instance.rb +2 -0
- data/lib/fog/google/requests/sql/restore_instance_backup.rb +2 -0
- data/lib/fog/google/requests/sql/update_instance.rb +2 -0
- data/lib/fog/google/requests/sql/update_user.rb +2 -0
- data/lib/fog/google/version.rb +1 -1
- data/lib/fog/storage/google_json/requests/copy_object.rb +2 -0
- data/lib/fog/storage/google_json/requests/delete_bucket.rb +2 -0
- data/lib/fog/storage/google_json/requests/delete_object.rb +2 -0
- data/lib/fog/storage/google_json/requests/get_bucket.rb +2 -0
- data/lib/fog/storage/google_json/requests/get_bucket_acl.rb +2 -0
- data/lib/fog/storage/google_json/requests/get_object.rb +2 -0
- data/lib/fog/storage/google_json/requests/get_object_acl.rb +2 -0
- data/lib/fog/storage/google_json/requests/get_object_metadata.rb +2 -0
- data/lib/fog/storage/google_json/requests/list_bucket_acl.rb +2 -0
- data/lib/fog/storage/google_json/requests/list_buckets.rb +2 -0
- data/lib/fog/storage/google_json/requests/list_object_acl.rb +2 -0
- data/lib/fog/storage/google_json/requests/list_objects.rb +2 -0
- data/lib/fog/storage/google_json/requests/put_bucket.rb +2 -0
- data/lib/fog/storage/google_json/requests/put_bucket_acl.rb +2 -0
- data/lib/fog/storage/google_json/requests/put_object.rb +2 -0
- data/lib/fog/storage/google_json/requests/put_object_acl.rb +2 -0
- data/lib/fog/storage/google_xml/requests/put_bucket_acl.rb +2 -0
- data/tasks/test.rake +6 -2
- data/test/helpers/integration_test_helper.rb +2 -5
- data/test/helpers/test_helper.rb +1 -0
- data/test/integration/compute/core_compute/test_servers.rb +40 -0
- data/test/integration/compute/core_compute/test_zones.rb +1 -1
- data/test/integration/compute/core_networking/test_addresses.rb +23 -0
- data/test/integration/factories/{sql_v1_certs_factory.rb → sql_certs_factory.rb} +3 -3
- data/test/integration/factories/{sql_v1_instances_factory.rb → sql_instances_factory.rb} +3 -3
- data/test/integration/factories/{sql_v1_users_factory.rb → sql_users_factory.rb} +6 -3
- data/test/integration/monitoring/test_metric_descriptors.rb +2 -0
- data/test/integration/monitoring/test_timeseries.rb +3 -1
- data/test/integration/sql/{sqlv1/test_v1_certs.rb → test_certs.rb} +4 -3
- data/test/integration/sql/{sqlv1/test_common_flags.rb → test_common_flags.rb} +0 -0
- data/test/integration/sql/{sqlv1/test_common_tiers.rb → test_common_tiers.rb} +0 -0
- data/test/integration/sql/{sqlv1/test_coverage.rb → test_coverage.rb} +1 -1
- data/test/integration/sql/{sqlv2/test_v2_instances.rb → test_instances.rb} +22 -2
- data/test/integration/sql/{sqlv1/test_v1_users.rb → test_users.rb} +4 -4
- metadata +37 -32
- data/test/integration/factories/sql_v2_instances_factory.rb +0 -19
- data/test/integration/sql/sqlv1/test_v1_instances.rb +0 -31
- data/test/integration/sql/sqlv2/test_coverage.rb +0 -6
@@ -1,9 +1,9 @@
|
|
1
1
|
require "integration/factories/collection_factory"
|
2
|
-
require "integration/factories/
|
2
|
+
require "integration/factories/sql_instances_factory"
|
3
3
|
|
4
|
-
class
|
4
|
+
class SqlCertsFactory < CollectionFactory
|
5
5
|
def initialize(example)
|
6
|
-
@instances =
|
6
|
+
@instances = SqlInstancesFactory.new(example)
|
7
7
|
super(Fog::Google[:sql].ssl_certs, example)
|
8
8
|
end
|
9
9
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "integration/factories/collection_factory"
|
2
2
|
|
3
|
-
class
|
3
|
+
class SqlInstancesFactory < CollectionFactory
|
4
4
|
def initialize(example)
|
5
5
|
super(Fog::Google[:sql].instances, example)
|
6
6
|
end
|
@@ -13,7 +13,7 @@ class SqlV1InstancesFactory < CollectionFactory
|
|
13
13
|
# Name has a time suffix due to SQL resources API objects having
|
14
14
|
# a _very_ long life on the backend (n(days)) after deletion.
|
15
15
|
{ :name => "#{resource_name}-#{Time.now.to_i}",
|
16
|
-
:region =>
|
17
|
-
:tier =>
|
16
|
+
:region => TEST_SQL_REGION,
|
17
|
+
:tier => TEST_SQL_TIER }
|
18
18
|
end
|
19
19
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require "integration/factories/collection_factory"
|
2
|
-
require "integration/factories/
|
2
|
+
require "integration/factories/sql_instances_factory"
|
3
3
|
|
4
|
-
class
|
4
|
+
class SqlUsersFactory < CollectionFactory
|
5
5
|
def initialize(example)
|
6
|
-
@instances =
|
6
|
+
@instances = SqlInstancesFactory.new(example)
|
7
7
|
super(Fog::Google[:sql].users, example)
|
8
8
|
end
|
9
9
|
|
@@ -15,6 +15,9 @@ class SqlV1UsersFactory < CollectionFactory
|
|
15
15
|
def params
|
16
16
|
# Username should not be longer than 16 characters
|
17
17
|
{ :name => resource_name[0..15],
|
18
|
+
# TODO: Consider removing host when Users.list API issue is resolved
|
19
|
+
# See https://github.com/fog/fog-google/issues/462
|
20
|
+
:host => "%",
|
18
21
|
:instance => @instances.create.name }
|
19
22
|
end
|
20
23
|
end
|
@@ -104,7 +104,9 @@ class TestMetricDescriptors < FogIntegrationTest
|
|
104
104
|
descriptors = @client.metric_descriptors.all
|
105
105
|
assert_operator(descriptors.size, :>, 0,
|
106
106
|
"metric descriptor count should be positive")
|
107
|
+
end
|
107
108
|
|
109
|
+
def test_metric_descriptors_all_page_size
|
108
110
|
descriptors = @client.metric_descriptors.all(
|
109
111
|
:filter => 'metric.type = starts_with("compute.googleapis.com")',
|
110
112
|
:page_size => 5
|
@@ -151,6 +151,8 @@ class TestMetricDescriptors < FogIntegrationTest
|
|
151
151
|
:page_size => 1
|
152
152
|
)
|
153
153
|
end
|
154
|
+
|
155
|
+
refute_nil(resp.time_series, "expected timeseries to not be nil")
|
154
156
|
assert_equal(resp.time_series.size, 1,
|
155
157
|
"expected timeseries count to be equal to page size 1")
|
156
158
|
|
@@ -164,7 +166,7 @@ class TestMetricDescriptors < FogIntegrationTest
|
|
164
166
|
"expected timeseries count to be equal to page size 1")
|
165
167
|
labels = resp.time_series.first.metric.labels
|
166
168
|
labels_next = next_resp.time_series.first.metric.labels
|
167
|
-
|
169
|
+
refute_equal(labels, labels_next,
|
168
170
|
"expected different timeseries when using page_token")
|
169
171
|
|
170
172
|
# Test filter
|
@@ -1,12 +1,13 @@
|
|
1
1
|
require "helpers/integration_test_helper"
|
2
|
-
require "integration/factories/
|
2
|
+
require "integration/factories/sql_certs_factory"
|
3
|
+
require "pry"
|
3
4
|
|
4
|
-
class
|
5
|
+
class TestSQLCerts < FogIntegrationTest
|
5
6
|
# This test doesn't include TestCollection as certs are not an independent resource.
|
6
7
|
|
7
8
|
def setup
|
8
9
|
@subject = Fog::Google[:sql].ssl_certs
|
9
|
-
@factory =
|
10
|
+
@factory = SqlCertsFactory.new(namespaced_name)
|
10
11
|
@client = Fog::Google::SQL.new
|
11
12
|
end
|
12
13
|
|
File without changes
|
File without changes
|
@@ -3,4 +3,4 @@ require "helpers/integration_test_helper"
|
|
3
3
|
# This is a simple coverage helper that helps differentiate
|
4
4
|
# the tests when run in parallel so the final coverage report
|
5
5
|
# can be properly combined together from multiple runners
|
6
|
-
SimpleCov.command_name "test:
|
6
|
+
SimpleCov.command_name "test:sql" if ENV["COVERAGE"]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require "helpers/integration_test_helper"
|
2
|
-
require "integration/factories/
|
2
|
+
require "integration/factories/sql_instances_factory"
|
3
3
|
# Client helper is imported for `wait_until_complete`
|
4
4
|
# TODO: Remove when fog-google#339 or fog-google#340 is resolved
|
5
5
|
require "helpers/client_helper"
|
@@ -12,13 +12,33 @@ class TestSQLV2Instances < FogIntegrationTest
|
|
12
12
|
|
13
13
|
def setup
|
14
14
|
@subject = Fog::Google[:sql].instances
|
15
|
-
@factory =
|
15
|
+
@factory = SqlInstancesFactory.new(namespaced_name)
|
16
16
|
@backup_runs = Fog::Google[:sql].backup_runs
|
17
17
|
# TODO: Remove after BackupRuns get save/reload - fog-google#339
|
18
18
|
# See https://github.com/fog/fog-google/issues/339
|
19
19
|
@client = Fog::Google::SQL.new
|
20
20
|
end
|
21
21
|
|
22
|
+
def test_update
|
23
|
+
instance = @factory.create
|
24
|
+
|
25
|
+
settings_version = instance.settings_version
|
26
|
+
labels = {
|
27
|
+
:foo => "bar"
|
28
|
+
}
|
29
|
+
instance.settings[:user_labels] = labels
|
30
|
+
instance.save
|
31
|
+
|
32
|
+
updated = @subject.get(instance.name)
|
33
|
+
assert_equal(labels, updated.settings[:user_labels])
|
34
|
+
assert_operator(updated.settings_version, :>, settings_version)
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_default_settings
|
38
|
+
instance = @factory.create
|
39
|
+
assert_equal([], instance.ssl_certs, "new instance should have 0 initial ssl certs")
|
40
|
+
end
|
41
|
+
|
22
42
|
def test_restore_backup_run
|
23
43
|
instance = @factory.create
|
24
44
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
require "helpers/integration_test_helper"
|
2
|
-
require "integration/factories/
|
3
|
-
require "integration/factories/
|
2
|
+
require "integration/factories/sql_instances_factory"
|
3
|
+
require "integration/factories/sql_users_factory"
|
4
4
|
|
5
|
-
class
|
5
|
+
class TestSQLUsers < FogIntegrationTest
|
6
6
|
# This test doesn't include TestCollection as Users is not a
|
7
7
|
# classical Fog model, as it's tied to a particular instance
|
8
8
|
# I.e.:
|
@@ -12,7 +12,7 @@ class TestSQLV1Users < FogIntegrationTest
|
|
12
12
|
|
13
13
|
def setup
|
14
14
|
@subject = Fog::Google[:sql].users
|
15
|
-
@factory =
|
15
|
+
@factory = SqlUsersFactory.new(namespaced_name)
|
16
16
|
end
|
17
17
|
|
18
18
|
def teardown
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-google
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nat Welch
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog-core
|
@@ -57,16 +57,22 @@ dependencies:
|
|
57
57
|
name: google-api-client
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - "
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0.32'
|
63
|
+
- - "<"
|
61
64
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
65
|
+
version: '0.34'
|
63
66
|
type: :runtime
|
64
67
|
prerelease: false
|
65
68
|
version_requirements: !ruby/object:Gem::Requirement
|
66
69
|
requirements:
|
67
|
-
- - "
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0.32'
|
73
|
+
- - "<"
|
68
74
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
75
|
+
version: '0.34'
|
70
76
|
- !ruby/object:Gem::Dependency
|
71
77
|
name: pry
|
72
78
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,11 +210,14 @@ files:
|
|
204
210
|
- MIGRATING.md
|
205
211
|
- README.md
|
206
212
|
- Rakefile
|
213
|
+
- SECURITY.md
|
207
214
|
- ci/.gitignore
|
208
215
|
- ci/README.md
|
216
|
+
- ci/build-head-pipeline.yml
|
209
217
|
- ci/credentials.yml.template
|
210
218
|
- ci/docker-image/Dockerfile
|
211
|
-
- ci/pipeline.yml
|
219
|
+
- ci/integration-pipeline.yml
|
220
|
+
- ci/pipeline-dev.yml
|
212
221
|
- ci/tasks/run-int.sh
|
213
222
|
- ci/tasks/run-int.yml
|
214
223
|
- ci/tasks/utils.sh
|
@@ -447,11 +456,13 @@ files:
|
|
447
456
|
- lib/fog/compute/google/requests/remove_target_pool_instance.rb
|
448
457
|
- lib/fog/compute/google/requests/remove_target_pool_instances.rb
|
449
458
|
- lib/fog/compute/google/requests/reset_server.rb
|
459
|
+
- lib/fog/compute/google/requests/reset_windows_password.rb
|
450
460
|
- lib/fog/compute/google/requests/set_common_instance_metadata.rb
|
451
461
|
- lib/fog/compute/google/requests/set_forwarding_rule_target.rb
|
452
462
|
- lib/fog/compute/google/requests/set_global_forwarding_rule_target.rb
|
453
463
|
- lib/fog/compute/google/requests/set_instance_template.rb
|
454
464
|
- lib/fog/compute/google/requests/set_server_disk_auto_delete.rb
|
465
|
+
- lib/fog/compute/google/requests/set_server_machine_type.rb
|
455
466
|
- lib/fog/compute/google/requests/set_server_metadata.rb
|
456
467
|
- lib/fog/compute/google/requests/set_server_scheduling.rb
|
457
468
|
- lib/fog/compute/google/requests/set_server_tags.rb
|
@@ -694,10 +705,9 @@ files:
|
|
694
705
|
- test/integration/factories/instance_template_factory.rb
|
695
706
|
- test/integration/factories/networks_factory.rb
|
696
707
|
- test/integration/factories/servers_factory.rb
|
697
|
-
- test/integration/factories/
|
698
|
-
- test/integration/factories/
|
699
|
-
- test/integration/factories/
|
700
|
-
- test/integration/factories/sql_v2_instances_factory.rb
|
708
|
+
- test/integration/factories/sql_certs_factory.rb
|
709
|
+
- test/integration/factories/sql_instances_factory.rb
|
710
|
+
- test/integration/factories/sql_users_factory.rb
|
701
711
|
- test/integration/factories/ssl_certificates_factory.rb
|
702
712
|
- test/integration/factories/subnetworks_factory.rb
|
703
713
|
- test/integration/factories/target_http_proxies_factory.rb
|
@@ -713,14 +723,12 @@ files:
|
|
713
723
|
- test/integration/pubsub/test_coverage.rb
|
714
724
|
- test/integration/pubsub/test_pubsub_models.rb
|
715
725
|
- test/integration/pubsub/test_pubsub_requests.rb
|
716
|
-
- test/integration/sql/
|
717
|
-
- test/integration/sql/
|
718
|
-
- test/integration/sql/
|
719
|
-
- test/integration/sql/
|
720
|
-
- test/integration/sql/
|
721
|
-
- test/integration/sql/
|
722
|
-
- test/integration/sql/sqlv2/test_coverage.rb
|
723
|
-
- test/integration/sql/sqlv2/test_v2_instances.rb
|
726
|
+
- test/integration/sql/test_certs.rb
|
727
|
+
- test/integration/sql/test_common_flags.rb
|
728
|
+
- test/integration/sql/test_common_tiers.rb
|
729
|
+
- test/integration/sql/test_coverage.rb
|
730
|
+
- test/integration/sql/test_instances.rb
|
731
|
+
- test/integration/sql/test_users.rb
|
724
732
|
- test/integration/storage/storage_shared.rb
|
725
733
|
- test/integration/storage/test_buckets.rb
|
726
734
|
- test/integration/storage/test_coverage.rb
|
@@ -759,7 +767,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
759
767
|
version: '0'
|
760
768
|
requirements: []
|
761
769
|
rubyforge_project:
|
762
|
-
rubygems_version: 2.6.14.
|
770
|
+
rubygems_version: 2.6.14.4
|
763
771
|
signing_key:
|
764
772
|
specification_version: 4
|
765
773
|
summary: Module for the 'fog' gem to support Google.
|
@@ -817,10 +825,9 @@ test_files:
|
|
817
825
|
- test/integration/factories/instance_template_factory.rb
|
818
826
|
- test/integration/factories/networks_factory.rb
|
819
827
|
- test/integration/factories/servers_factory.rb
|
820
|
-
- test/integration/factories/
|
821
|
-
- test/integration/factories/
|
822
|
-
- test/integration/factories/
|
823
|
-
- test/integration/factories/sql_v2_instances_factory.rb
|
828
|
+
- test/integration/factories/sql_certs_factory.rb
|
829
|
+
- test/integration/factories/sql_instances_factory.rb
|
830
|
+
- test/integration/factories/sql_users_factory.rb
|
824
831
|
- test/integration/factories/ssl_certificates_factory.rb
|
825
832
|
- test/integration/factories/subnetworks_factory.rb
|
826
833
|
- test/integration/factories/target_http_proxies_factory.rb
|
@@ -836,14 +843,12 @@ test_files:
|
|
836
843
|
- test/integration/pubsub/test_coverage.rb
|
837
844
|
- test/integration/pubsub/test_pubsub_models.rb
|
838
845
|
- test/integration/pubsub/test_pubsub_requests.rb
|
839
|
-
- test/integration/sql/
|
840
|
-
- test/integration/sql/
|
841
|
-
- test/integration/sql/
|
842
|
-
- test/integration/sql/
|
843
|
-
- test/integration/sql/
|
844
|
-
- test/integration/sql/
|
845
|
-
- test/integration/sql/sqlv2/test_coverage.rb
|
846
|
-
- test/integration/sql/sqlv2/test_v2_instances.rb
|
846
|
+
- test/integration/sql/test_certs.rb
|
847
|
+
- test/integration/sql/test_common_flags.rb
|
848
|
+
- test/integration/sql/test_common_tiers.rb
|
849
|
+
- test/integration/sql/test_coverage.rb
|
850
|
+
- test/integration/sql/test_instances.rb
|
851
|
+
- test/integration/sql/test_users.rb
|
847
852
|
- test/integration/storage/storage_shared.rb
|
848
853
|
- test/integration/storage/test_buckets.rb
|
849
854
|
- test/integration/storage/test_coverage.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require "integration/factories/collection_factory"
|
2
|
-
|
3
|
-
class SqlV2InstancesFactory < CollectionFactory
|
4
|
-
def initialize(example)
|
5
|
-
super(Fog::Google[:sql].instances, example)
|
6
|
-
end
|
7
|
-
|
8
|
-
def cleanup
|
9
|
-
super
|
10
|
-
end
|
11
|
-
|
12
|
-
def params
|
13
|
-
# Name has a time suffix due to SQL resources API objects having
|
14
|
-
# a _very_ long life on the backend (n(days)) after deletion.
|
15
|
-
{ :name => "#{resource_name}-#{Time.now.to_i}",
|
16
|
-
:region => TEST_SQL_REGION_SECOND,
|
17
|
-
:tier => TEST_SQL_TIER_SECOND }
|
18
|
-
end
|
19
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
require "helpers/integration_test_helper"
|
2
|
-
require "integration/factories/sql_v1_instances_factory"
|
3
|
-
|
4
|
-
class TestSQLV1Instances < FogIntegrationTest
|
5
|
-
include TestCollection
|
6
|
-
|
7
|
-
def setup
|
8
|
-
@subject = Fog::Google[:sql].instances
|
9
|
-
@factory = SqlV1InstancesFactory.new(namespaced_name)
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_update
|
13
|
-
instance = @factory.create
|
14
|
-
|
15
|
-
settings_version = instance.settings_version
|
16
|
-
labels = {
|
17
|
-
:foo => "bar"
|
18
|
-
}
|
19
|
-
instance.settings[:user_labels] = labels
|
20
|
-
instance.save
|
21
|
-
|
22
|
-
updated = @subject.get(instance.name)
|
23
|
-
assert_equal(labels, updated.settings[:user_labels])
|
24
|
-
assert_operator(updated.settings_version, :>, settings_version)
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_default_settings
|
28
|
-
instance = @factory.create
|
29
|
-
assert_equal([], instance.ssl_certs, "new instance should have 0 initial ssl certs")
|
30
|
-
end
|
31
|
-
end
|
@@ -1,6 +0,0 @@
|
|
1
|
-
require "helpers/integration_test_helper"
|
2
|
-
|
3
|
-
# This is a simple coverage helper that helps differentiate
|
4
|
-
# the tests when run in parallel so the final coverage report
|
5
|
-
# can be properly combined together from multiple runners
|
6
|
-
SimpleCov.command_name "test:sqlv2" if ENV["COVERAGE"]
|