fog-aws 3.5.0 → 3.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -765
- data/LICENSE.md +1 -1
- data/README.md +117 -7
- data/fog-aws.gemspec +14 -11
- data/lib/fog/aws/auto_scaling.rb +1 -1
- data/lib/fog/aws/beanstalk.rb +1 -1
- data/lib/fog/aws/cdn.rb +1 -1
- data/lib/fog/aws/cloud_formation.rb +1 -1
- data/lib/fog/aws/cloud_watch.rb +1 -1
- data/lib/fog/aws/compute.rb +8 -5
- data/lib/fog/aws/credential_fetcher.rb +89 -7
- data/lib/fog/aws/data_pipeline.rb +1 -1
- data/lib/fog/aws/dns.rb +137 -1
- data/lib/fog/aws/dynamodb.rb +1 -1
- data/lib/fog/aws/ecs.rb +1 -1
- data/lib/fog/aws/elasticache.rb +6 -4
- data/lib/fog/aws/elb.rb +2 -2
- data/lib/fog/aws/elbv2.rb +72 -0
- data/lib/fog/aws/emr.rb +1 -1
- data/lib/fog/aws/glacier.rb +84 -22
- data/lib/fog/aws/iam.rb +1 -1
- data/lib/fog/aws/kinesis.rb +24 -16
- data/lib/fog/aws/kms.rb +1 -1
- data/lib/fog/aws/lambda.rb +1 -1
- data/lib/fog/aws/models/compute/dhcp_option.rb +1 -1
- data/lib/fog/aws/models/compute/flavors.rb +3803 -531
- data/lib/fog/aws/models/compute/network_interfaces.rb +1 -1
- data/lib/fog/aws/models/compute/security_group.rb +13 -5
- data/lib/fog/aws/models/compute/server.rb +6 -2
- data/lib/fog/aws/models/compute/servers.rb +2 -0
- data/lib/fog/aws/models/compute/snapshot.rb +7 -6
- data/lib/fog/aws/models/compute/vpc.rb +8 -2
- data/lib/fog/aws/models/elasticache/cluster.rb +1 -1
- data/lib/fog/aws/models/storage/directories.rb +1 -0
- data/lib/fog/aws/models/storage/directory.rb +0 -1
- data/lib/fog/aws/models/storage/file.rb +168 -23
- data/lib/fog/aws/models/storage/files.rb +33 -2
- data/lib/fog/aws/parsers/compute/create_snapshot.rb +1 -1
- data/lib/fog/aws/parsers/compute/create_subnet.rb +33 -6
- data/lib/fog/aws/parsers/compute/describe_security_groups.rb +18 -4
- data/lib/fog/aws/parsers/compute/describe_subnets.rb +33 -6
- data/lib/fog/aws/parsers/dns/create_hosted_zone.rb +1 -1
- data/lib/fog/aws/parsers/dns/get_hosted_zone.rb +3 -3
- data/lib/fog/aws/parsers/dns/list_hosted_zones.rb +3 -1
- data/lib/fog/aws/parsers/elbv2/create_load_balancer.rb +88 -0
- data/lib/fog/aws/parsers/elbv2/describe_listeners.rb +110 -0
- data/lib/fog/aws/parsers/elbv2/describe_load_balancers.rb +88 -0
- data/lib/fog/aws/parsers/elbv2/describe_tags.rb +53 -0
- data/lib/fog/aws/parsers/elbv2/empty.rb +10 -0
- data/lib/fog/aws/parsers/iam/get_group_policy.rb +1 -1
- data/lib/fog/aws/parsers/iam/get_role_policy.rb +1 -1
- data/lib/fog/aws/parsers/iam/get_user_policy.rb +1 -1
- data/lib/fog/aws/parsers/iam/list_server_certificates.rb +1 -1
- data/lib/fog/aws/parsers/iam/policy_version.rb +1 -1
- data/lib/fog/aws/parsers/rds/db_cluster_parser.rb +1 -1
- data/lib/fog/aws/parsers/rds/db_parser.rb +1 -1
- data/lib/fog/aws/parsers/rds/modify_db_subnet_group.rb +1 -1
- data/lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb +1 -1
- data/lib/fog/aws/parsers/storage/get_object_tagging.rb +33 -0
- data/lib/fog/aws/parsers/storage/upload_part_copy_object.rb +18 -0
- data/lib/fog/aws/parsers/sts/assume_role_with_web_identity.rb +1 -1
- data/lib/fog/aws/rds.rb +1 -1
- data/lib/fog/aws/redshift.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/attach_load_balancer_target_groups.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/describe_scaling_activities.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/put_scheduled_update_group_action.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/create_change_set.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/create_stack.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/get_template_summary.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/update_stack.rb +1 -1
- data/lib/fog/aws/requests/cloud_watch/list_metrics.rb +1 -1
- data/lib/fog/aws/requests/compute/authorize_security_group_egress.rb +1 -1
- data/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +16 -1
- data/lib/fog/aws/requests/compute/create_network_interface.rb +8 -5
- data/lib/fog/aws/requests/compute/create_subnet.rb +3 -3
- data/lib/fog/aws/requests/compute/create_vpc.rb +3 -3
- data/lib/fog/aws/requests/compute/describe_network_interfaces.rb +2 -2
- data/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -0
- data/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb +1 -1
- data/lib/fog/aws/requests/compute/modify_volume.rb +1 -1
- data/lib/fog/aws/requests/compute/request_spot_instances.rb +1 -1
- data/lib/fog/aws/requests/compute/revoke_security_group_egress.rb +1 -1
- data/lib/fog/aws/requests/compute/revoke_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/compute/run_instances.rb +64 -0
- data/lib/fog/aws/requests/compute/stop_instances.rb +11 -3
- data/lib/fog/aws/requests/data_pipeline/deactivate_pipeline.rb +1 -1
- data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +0 -133
- data/lib/fog/aws/requests/ecs/list_task_definitions.rb +1 -1
- data/lib/fog/aws/requests/efs/create_file_system.rb +1 -1
- data/lib/fog/aws/requests/elasticache/authorize_cache_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/elasticache/create_cache_cluster.rb +2 -2
- data/lib/fog/aws/requests/elasticache/describe_engine_default_parameters.rb +1 -1
- data/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb +1 -1
- data/lib/fog/aws/requests/elbv2/add_tags.rb +45 -0
- data/lib/fog/aws/requests/elbv2/create_load_balancer.rb +160 -0
- data/lib/fog/aws/requests/elbv2/describe_listeners.rb +38 -0
- data/lib/fog/aws/requests/elbv2/describe_load_balancers.rb +100 -0
- data/lib/fog/aws/requests/elbv2/describe_tags.rb +50 -0
- data/lib/fog/aws/requests/elbv2/remove_tags.rb +45 -0
- data/lib/fog/aws/requests/glacier/initiate_job.rb +1 -1
- data/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb +1 -1
- data/lib/fog/aws/requests/kinesis/list_streams.rb +1 -1
- data/lib/fog/aws/requests/lambda/invoke.rb +7 -7
- data/lib/fog/aws/requests/rds/add_tags_to_resource.rb +12 -10
- data/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +2 -2
- data/lib/fog/aws/requests/rds/create_db_cluster.rb +1 -1
- data/lib/fog/aws/requests/rds/describe_db_snapshots.rb +1 -1
- data/lib/fog/aws/requests/rds/list_tags_for_resource.rb +10 -7
- data/lib/fog/aws/requests/rds/modify_db_instance.rb +1 -1
- data/lib/fog/aws/requests/rds/modify_db_parameter_group.rb +1 -1
- data/lib/fog/aws/requests/rds/remove_tags_from_resource.rb +9 -8
- data/lib/fog/aws/requests/ses/send_raw_email.rb +1 -1
- data/lib/fog/aws/requests/sqs/change_message_visibility.rb +1 -1
- data/lib/fog/aws/requests/sqs/delete_message.rb +1 -1
- data/lib/fog/aws/requests/storage/copy_object.rb +2 -1
- data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +18 -8
- data/lib/fog/aws/requests/storage/get_bucket.rb +2 -2
- data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +2 -2
- data/lib/fog/aws/requests/storage/get_object.rb +1 -1
- data/lib/fog/aws/requests/storage/get_object_tagging.rb +41 -0
- data/lib/fog/aws/requests/storage/get_service.rb +1 -1
- data/lib/fog/aws/requests/storage/list_parts.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket.rb +0 -4
- data/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_notification.rb +1 -1
- data/lib/fog/aws/requests/storage/put_object.rb +1 -1
- data/lib/fog/aws/requests/storage/put_object_tagging.rb +42 -0
- data/lib/fog/aws/requests/storage/shared_mock_methods.rb +2 -1
- data/lib/fog/aws/requests/storage/sync_clock.rb +9 -1
- data/lib/fog/aws/requests/storage/upload_part_copy.rb +119 -0
- data/lib/fog/aws/requests/sts/assume_role_with_web_identity.rb +7 -6
- data/lib/fog/aws/ses.rb +20 -17
- data/lib/fog/aws/signaturev4.rb +1 -1
- data/lib/fog/aws/simpledb.rb +1 -1
- data/lib/fog/aws/sns.rb +1 -1
- data/lib/fog/aws/sqs.rb +1 -1
- data/lib/fog/aws/storage.rb +78 -13
- data/lib/fog/aws/support.rb +1 -1
- data/lib/fog/aws/version.rb +1 -1
- data/lib/fog/aws.rb +11 -2
- metadata +49 -294
- data/.gitignore +0 -16
- data/.travis.yml +0 -53
- data/Gemfile +0 -14
- data/Rakefile +0 -14
- data/gemfiles/Gemfile-edge +0 -14
- data/gemfiles/Gemfile-ruby-2.0 +0 -7
- data/stale.yml +0 -17
- data/tests/credentials_tests.rb +0 -87
- data/tests/helper.rb +0 -29
- data/tests/helpers/collection_helper.rb +0 -90
- data/tests/helpers/compute/flavors_helper.rb +0 -28
- data/tests/helpers/compute/server_helper.rb +0 -23
- data/tests/helpers/compute/servers_helper.rb +0 -8
- data/tests/helpers/dns_helper.rb +0 -56
- data/tests/helpers/formats_helper.rb +0 -100
- data/tests/helpers/formats_helper_tests.rb +0 -107
- data/tests/helpers/mock_helper.rb +0 -109
- data/tests/helpers/model_helper.rb +0 -30
- data/tests/helpers/responds_to_helper.rb +0 -11
- data/tests/helpers/schema_validator_tests.rb +0 -104
- data/tests/helpers/succeeds_helper.rb +0 -9
- data/tests/lorem.txt +0 -1
- data/tests/models/auto_scaling/activities_tests.rb +0 -6
- data/tests/models/auto_scaling/configuration_test.rb +0 -13
- data/tests/models/auto_scaling/configurations_tests.rb +0 -11
- data/tests/models/auto_scaling/groups_test.rb +0 -27
- data/tests/models/auto_scaling/helper.rb +0 -0
- data/tests/models/auto_scaling/instance_tests.rb +0 -15
- data/tests/models/auto_scaling/instances_tests.rb +0 -6
- data/tests/models/beanstalk/application_tests.rb +0 -69
- data/tests/models/beanstalk/applications_tests.rb +0 -7
- data/tests/models/beanstalk/environment_tests.rb +0 -131
- data/tests/models/beanstalk/environments_tests.rb +0 -34
- data/tests/models/beanstalk/template_tests.rb +0 -47
- data/tests/models/beanstalk/templates_tests.rb +0 -62
- data/tests/models/beanstalk/version_tests.rb +0 -66
- data/tests/models/beanstalk/versions_tests.rb +0 -60
- data/tests/models/cdn/distribution_tests.rb +0 -15
- data/tests/models/cdn/distributions_tests.rb +0 -15
- data/tests/models/cdn/invalidation_tests.rb +0 -31
- data/tests/models/cdn/invalidations_tests.rb +0 -14
- data/tests/models/cdn/streaming_distribution_tests.rb +0 -15
- data/tests/models/cdn/streaming_distributions_tests.rb +0 -15
- data/tests/models/cloud_watch/alarm_data_tests.rb +0 -42
- data/tests/models/cloud_watch/alarm_history_tests.rb +0 -22
- data/tests/models/cloud_watch/metric_statistics_tests.rb +0 -51
- data/tests/models/cloud_watch/metrics_tests.rb +0 -32
- data/tests/models/compute/address_tests.rb +0 -43
- data/tests/models/compute/addresses_tests.rb +0 -5
- data/tests/models/compute/dhcp_option_tests.rb +0 -3
- data/tests/models/compute/dhcp_options_tests.rb +0 -3
- data/tests/models/compute/internet_gateway_tests.rb +0 -3
- data/tests/models/compute/internet_gateways_tests.rb +0 -3
- data/tests/models/compute/key_pair_tests.rb +0 -26
- data/tests/models/compute/key_pairs_tests.rb +0 -5
- data/tests/models/compute/network_acl_tests.rb +0 -109
- data/tests/models/compute/network_acls_tests.rb +0 -20
- data/tests/models/compute/network_interfaces_test.rb +0 -12
- data/tests/models/compute/security_group_tests.rb +0 -98
- data/tests/models/compute/security_groups_tests.rb +0 -5
- data/tests/models/compute/server_tests.rb +0 -94
- data/tests/models/compute/snapshot_tests.rb +0 -10
- data/tests/models/compute/snapshots_tests.rb +0 -10
- data/tests/models/compute/subnet_tests.rb +0 -13
- data/tests/models/compute/subnets_tests.rb +0 -5
- data/tests/models/compute/volume_tests.rb +0 -65
- data/tests/models/compute/volumes_tests.rb +0 -5
- data/tests/models/compute/vpc_tests.rb +0 -26
- data/tests/models/compute/vpcs_tests.rb +0 -19
- data/tests/models/data_pipeline/pipeline_tests.rb +0 -8
- data/tests/models/data_pipeline/pipelines_tests.rb +0 -8
- data/tests/models/dns/record_tests.rb +0 -33
- data/tests/models/dns/records_tests.rb +0 -41
- data/tests/models/dns/zone_tests.rb +0 -4
- data/tests/models/dns/zones_tests.rb +0 -4
- data/tests/models/efs/file_system_tests.rb +0 -12
- data/tests/models/efs/mount_target_tests.rb +0 -45
- data/tests/models/efs/mount_targets_tests.rb +0 -30
- data/tests/models/elasticache/cluster_tests.rb +0 -30
- data/tests/models/elasticache/parameter_groups_tests.rb +0 -15
- data/tests/models/elasticache/security_groups_tests.rb +0 -52
- data/tests/models/elasticache/subnet_groups_tests.rb +0 -43
- data/tests/models/elb/model_tests.rb +0 -360
- data/tests/models/elb/tagging_tests.rb +0 -15
- data/tests/models/glacier/model_tests.rb +0 -47
- data/tests/models/iam/access_keys_tests.rb +0 -53
- data/tests/models/iam/groups_tests.rb +0 -59
- data/tests/models/iam/instance_profile_tests.rb +0 -18
- data/tests/models/iam/managed_policies_tests.rb +0 -89
- data/tests/models/iam/policies_tests.rb +0 -57
- data/tests/models/iam/roles_tests.rb +0 -71
- data/tests/models/iam/users_tests.rb +0 -119
- data/tests/models/rds/cluster_tests.rb +0 -54
- data/tests/models/rds/clusters_tests.rb +0 -5
- data/tests/models/rds/event_subscription_tests.rb +0 -9
- data/tests/models/rds/event_subscriptions_tests.rb +0 -6
- data/tests/models/rds/helper.rb +0 -25
- data/tests/models/rds/instance_option_tests.rb +0 -14
- data/tests/models/rds/parameter_group_tests.rb +0 -24
- data/tests/models/rds/parameter_groups_tests.rb +0 -8
- data/tests/models/rds/security_group_tests.rb +0 -77
- data/tests/models/rds/security_groups_tests.rb +0 -5
- data/tests/models/rds/server_tests.rb +0 -131
- data/tests/models/rds/servers_tests.rb +0 -24
- data/tests/models/rds/snapshot_tests.rb +0 -12
- data/tests/models/rds/snapshots_tests.rb +0 -12
- data/tests/models/rds/tagging_tests.rb +0 -20
- data/tests/models/sns/topic_tests.rb +0 -15
- data/tests/models/sns/topics_tests.rb +0 -6
- data/tests/models/storage/directory_tests.rb +0 -91
- data/tests/models/storage/file_tests.rb +0 -129
- data/tests/models/storage/files_tests.rb +0 -58
- data/tests/models/storage/url_tests.rb +0 -25
- data/tests/models/storage/version_tests.rb +0 -52
- data/tests/models/storage/versions_tests.rb +0 -51
- data/tests/models/support/trusted_advisor_tests.rb +0 -25
- data/tests/parsers/compute/describe_images_tests.rb +0 -33
- data/tests/parsers/elb/describe_load_balancers.rb +0 -65
- data/tests/requests/auto_scaling/auto_scaling_tests.rb +0 -111
- data/tests/requests/auto_scaling/describe_types_tests.rb +0 -102
- data/tests/requests/auto_scaling/helper.rb +0 -229
- data/tests/requests/auto_scaling/model_tests.rb +0 -235
- data/tests/requests/auto_scaling/notification_configuration_tests.rb +0 -124
- data/tests/requests/auto_scaling/tag_tests.rb +0 -63
- data/tests/requests/beanstalk/application_tests.rb +0 -140
- data/tests/requests/beanstalk/solution_stack_tests.rb +0 -22
- data/tests/requests/cdn/cdn_tests.rb +0 -252
- data/tests/requests/cloud_formation/stack_tests.rb +0 -167
- data/tests/requests/cloud_watch/get_metric_statistics_tests.rb +0 -28
- data/tests/requests/cloud_watch/list_metrics_test.rb +0 -64
- data/tests/requests/cloud_watch/put_metric_data_tests.rb +0 -36
- data/tests/requests/compute/address_tests.rb +0 -144
- data/tests/requests/compute/assign_private_ip_tests.rb +0 -55
- data/tests/requests/compute/availability_zone_tests.rb +0 -25
- data/tests/requests/compute/client_tests.rb +0 -25
- data/tests/requests/compute/dhcp_options_tests.rb +0 -39
- data/tests/requests/compute/helper.rb +0 -27
- data/tests/requests/compute/image_tests.rb +0 -169
- data/tests/requests/compute/instance_attrib_tests.rb +0 -168
- data/tests/requests/compute/instance_tests.rb +0 -338
- data/tests/requests/compute/internet_gateway_tests.rb +0 -49
- data/tests/requests/compute/key_pair_tests.rb +0 -67
- data/tests/requests/compute/network_acl_tests.rb +0 -112
- data/tests/requests/compute/network_interface_tests.rb +0 -239
- data/tests/requests/compute/placement_group_tests.rb +0 -48
- data/tests/requests/compute/region_tests.rb +0 -52
- data/tests/requests/compute/route_tests.rb +0 -341
- data/tests/requests/compute/security_group_tests.rb +0 -446
- data/tests/requests/compute/snapshot_tests.rb +0 -77
- data/tests/requests/compute/spot_datafeed_subscription_tests.rb +0 -47
- data/tests/requests/compute/spot_instance_tests.rb +0 -55
- data/tests/requests/compute/spot_price_history_tests.rb +0 -23
- data/tests/requests/compute/subnet_tests.rb +0 -87
- data/tests/requests/compute/tag_tests.rb +0 -101
- data/tests/requests/compute/volume_tests.rb +0 -263
- data/tests/requests/compute/vpc_tests.rb +0 -216
- data/tests/requests/data_pipeline/helper.rb +0 -78
- data/tests/requests/data_pipeline/pipeline_tests.rb +0 -80
- data/tests/requests/dns/change_resource_record_sets_tests.rb +0 -34
- data/tests/requests/dns/dns_tests.rb +0 -240
- data/tests/requests/dns/health_check_tests.rb +0 -159
- data/tests/requests/dns/helper.rb +0 -21
- data/tests/requests/dynamodb/item_tests.rb +0 -137
- data/tests/requests/dynamodb/table_tests.rb +0 -99
- data/tests/requests/ecs/cluster_tests.rb +0 -112
- data/tests/requests/ecs/container_instance_tests.rb +0 -119
- data/tests/requests/ecs/helper.rb +0 -276
- data/tests/requests/ecs/sample_task_definition1.json +0 -56
- data/tests/requests/ecs/service_tests.rb +0 -132
- data/tests/requests/ecs/task_definitions_tests.rb +0 -97
- data/tests/requests/ecs/task_tests.rb +0 -145
- data/tests/requests/efs/file_system_tests.rb +0 -152
- data/tests/requests/efs/helper.rb +0 -44
- data/tests/requests/elasticache/cache_cluster_tests.rb +0 -137
- data/tests/requests/elasticache/describe_events.rb +0 -17
- data/tests/requests/elasticache/describe_reserved_cache_nodes.rb +0 -17
- data/tests/requests/elasticache/helper.rb +0 -103
- data/tests/requests/elasticache/parameter_group_tests.rb +0 -105
- data/tests/requests/elasticache/security_group_tests.rb +0 -108
- data/tests/requests/elasticache/subnet_group_tests.rb +0 -52
- data/tests/requests/elb/helper.rb +0 -91
- data/tests/requests/elb/listener_tests.rb +0 -68
- data/tests/requests/elb/load_balancer_tests.rb +0 -89
- data/tests/requests/elb/policy_tests.rb +0 -132
- data/tests/requests/emr/helper.rb +0 -167
- data/tests/requests/emr/instance_group_tests.rb +0 -106
- data/tests/requests/emr/job_flow_tests.rb +0 -88
- data/tests/requests/federation/get_signin_token_tests.rb +0 -11
- data/tests/requests/glacier/archive_tests.rb +0 -13
- data/tests/requests/glacier/multipart_upload_tests.rb +0 -29
- data/tests/requests/glacier/tree_hash_tests.rb +0 -62
- data/tests/requests/glacier/vault_tests.rb +0 -35
- data/tests/requests/iam/access_key_tests.rb +0 -53
- data/tests/requests/iam/account_policy_tests.rb +0 -20
- data/tests/requests/iam/account_tests.rb +0 -34
- data/tests/requests/iam/group_policy_tests.rb +0 -48
- data/tests/requests/iam/group_tests.rb +0 -44
- data/tests/requests/iam/helper.rb +0 -154
- data/tests/requests/iam/instance_profile_tests.rb +0 -44
- data/tests/requests/iam/login_profile_tests.rb +0 -62
- data/tests/requests/iam/managed_policy_tests.rb +0 -110
- data/tests/requests/iam/mfa_tests.rb +0 -23
- data/tests/requests/iam/role_tests.rb +0 -156
- data/tests/requests/iam/server_certificate_tests.rb +0 -130
- data/tests/requests/iam/user_policy_tests.rb +0 -45
- data/tests/requests/iam/user_tests.rb +0 -78
- data/tests/requests/iam/versioned_managed_policy_tests.rb +0 -105
- data/tests/requests/kinesis/helper.rb +0 -111
- data/tests/requests/kinesis/stream_tests.rb +0 -169
- data/tests/requests/kms/helper.rb +0 -27
- data/tests/requests/kms/key_tests.rb +0 -23
- data/tests/requests/lambda/function_sample_1.js +0 -9
- data/tests/requests/lambda/function_sample_2.js +0 -9
- data/tests/requests/lambda/function_tests.rb +0 -460
- data/tests/requests/lambda/helper.rb +0 -81
- data/tests/requests/rds/cluster_snapshot_tests.rb +0 -43
- data/tests/requests/rds/cluster_tests.rb +0 -37
- data/tests/requests/rds/db_engine_versions.rb +0 -7
- data/tests/requests/rds/db_snapshot_tests.rb +0 -62
- data/tests/requests/rds/describe_events.rb +0 -16
- data/tests/requests/rds/event_subscription_tests.rb +0 -30
- data/tests/requests/rds/helper.rb +0 -406
- data/tests/requests/rds/instance_option_tests.rb +0 -27
- data/tests/requests/rds/instance_tests.rb +0 -149
- data/tests/requests/rds/log_file_tests.rb +0 -19
- data/tests/requests/rds/parameter_group_tests.rb +0 -62
- data/tests/requests/rds/parameter_request_tests.rb +0 -32
- data/tests/requests/rds/security_group_tests.rb +0 -101
- data/tests/requests/rds/subnet_groups_tests.rb +0 -52
- data/tests/requests/rds/tagging_tests.rb +0 -78
- data/tests/requests/redshift/cluster_parameter_group_tests.rb +0 -76
- data/tests/requests/redshift/cluster_security_group_tests.rb +0 -42
- data/tests/requests/redshift/cluster_snapshot_tests.rb +0 -73
- data/tests/requests/redshift/cluster_tests.rb +0 -80
- data/tests/requests/ses/helper.rb +0 -9
- data/tests/requests/ses/verified_domain_identity_tests.rb +0 -16
- data/tests/requests/ses/verified_email_address_tests.rb +0 -27
- data/tests/requests/simpledb/attributes_tests.rb +0 -86
- data/tests/requests/simpledb/domain_tests.rb +0 -51
- data/tests/requests/simpledb/helper.rb +0 -10
- data/tests/requests/sns/helper.rb +0 -9
- data/tests/requests/sns/subscription_tests.rb +0 -86
- data/tests/requests/sns/topic_tests.rb +0 -53
- data/tests/requests/sqs/helper.rb +0 -9
- data/tests/requests/sqs/message_tests.rb +0 -51
- data/tests/requests/sqs/queue_tests.rb +0 -50
- data/tests/requests/storage/acl_utils_tests.rb +0 -209
- data/tests/requests/storage/bucket_tests.rb +0 -416
- data/tests/requests/storage/cors_utils_tests.rb +0 -108
- data/tests/requests/storage/delete_multiple_objects_tests.rb +0 -12
- data/tests/requests/storage/multipart_upload_tests.rb +0 -121
- data/tests/requests/storage/object_tests.rb +0 -262
- data/tests/requests/storage/versioning_tests.rb +0 -262
- data/tests/requests/sts/assume_role_tests.rb +0 -19
- data/tests/requests/sts/assume_role_with_saml_tests.rb +0 -18
- data/tests/requests/sts/assume_role_with_web_identity_tests.rb +0 -28
- data/tests/requests/sts/get_federation_token_tests.rb +0 -20
- data/tests/requests/sts/session_token_tests.rb +0 -16
- data/tests/requests/support/helper.rb +0 -43
- data/tests/requests/support/trusted_advisor_check_tests.rb +0 -16
- data/tests/signaturev4_tests.rb +0 -106
- data/tests/signed_params_tests.rb +0 -17
- data/tests/storage_tests.rb +0 -7
@@ -1,57 +0,0 @@
|
|
1
|
-
Shindo.tests("Fog::Compute[:iam] | policies", ['aws','iam']) do
|
2
|
-
|
3
|
-
iam = Fog::AWS[:iam]
|
4
|
-
|
5
|
-
@username = 'fake_user'
|
6
|
-
@user = iam.users.create(:id => @username)
|
7
|
-
@policy_document = {"Statement"=>[{"Action"=>["sqs:*"], "Effect"=>"Allow", "Resource"=>"*"}]}
|
8
|
-
@policy_name = 'fake-sqs-policy'
|
9
|
-
|
10
|
-
tests('#all', 'there is no policies').succeeds do
|
11
|
-
@user.policies.empty?
|
12
|
-
end
|
13
|
-
|
14
|
-
tests('#create') do
|
15
|
-
tests('a valid policy').succeeds do
|
16
|
-
policy = @user.policies.create(:id => @policy_name, :document => @policy_document)
|
17
|
-
policy.id == @policy_name
|
18
|
-
policy.username == @username
|
19
|
-
policy.document == @policy_document
|
20
|
-
end
|
21
|
-
|
22
|
-
# The mocking doesn't validate the document policy
|
23
|
-
#tests('an invalid valid policy').succeeds do
|
24
|
-
# raises(Fog::AWS::IAM::Error) { @user.policies.create(id: 'non-valid-document', document: 'invalid json blob') }
|
25
|
-
#end
|
26
|
-
end
|
27
|
-
|
28
|
-
@user.policies.create(:id => 'another-policy', :document => {})
|
29
|
-
|
30
|
-
tests('#all','there are two policies').succeeds do
|
31
|
-
@user.policies.size == 2
|
32
|
-
end
|
33
|
-
|
34
|
-
tests('#get') do
|
35
|
-
tests('a valid policy').succeeds do
|
36
|
-
policy = @user.policies.get(@policy_name)
|
37
|
-
policy.id == @polic_name
|
38
|
-
policy.username == @username
|
39
|
-
policy.document == @policy_document
|
40
|
-
end
|
41
|
-
|
42
|
-
tests('an invalid policy').succeeds do
|
43
|
-
@user.policies.get('non-existing') == nil
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
tests('#destroy').succeeds do
|
48
|
-
@user.policies.get(@policy_name).destroy
|
49
|
-
end
|
50
|
-
|
51
|
-
# clean up
|
52
|
-
@user.access_keys.map(&:destroy)
|
53
|
-
@user.policies.map(&:destroy)
|
54
|
-
@user.destroy
|
55
|
-
|
56
|
-
|
57
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
Shindo.tests("Fog::Compute[:iam] | roles", ['aws','iam']) do
|
2
|
-
|
3
|
-
@iam = Fog::AWS[:iam]
|
4
|
-
@role_one_name = 'fake_role_one'
|
5
|
-
@role_two_name = 'fake_role_two'
|
6
|
-
|
7
|
-
@role_three_name = 'fake_role_three'
|
8
|
-
@role_three_path = '/path/to/fake_role_three/'
|
9
|
-
@role_four_name = 'fake_role_four'
|
10
|
-
|
11
|
-
tests('#create').succeeds do
|
12
|
-
@role_one = @iam.roles.create(:rolename => @role_one_name)
|
13
|
-
@role_one.rolename == @role_one_name
|
14
|
-
end
|
15
|
-
|
16
|
-
tests('#all','there is only one role').succeeds do
|
17
|
-
@iam.roles.size == 1
|
18
|
-
end
|
19
|
-
|
20
|
-
tests('#all','the only role should match').succeeds do
|
21
|
-
@iam.roles.first.rolename == @role_one_name
|
22
|
-
end
|
23
|
-
|
24
|
-
tests('#create','a second role').succeeds do
|
25
|
-
@role_two = @iam.roles.create(:rolename => @role_two_name)
|
26
|
-
@role_two.rolename == @role_two_name
|
27
|
-
end
|
28
|
-
|
29
|
-
tests('#all','there are two roles').succeeds do
|
30
|
-
@iam.roles.size == 2
|
31
|
-
end
|
32
|
-
|
33
|
-
tests('#get','an existing role').succeeds do
|
34
|
-
@iam.roles.get(@role_one_name).rolename == @role_one_name
|
35
|
-
end
|
36
|
-
|
37
|
-
tests('#get',"returns nil if the role doesn't exists").succeeds do
|
38
|
-
@iam.roles.get('blah').nil?
|
39
|
-
end
|
40
|
-
|
41
|
-
tests('#create', 'assigns path').succeeds do
|
42
|
-
@role_three = @iam.roles.create(:rolename => @role_three_name, :path => @role_three_path)
|
43
|
-
@role_three.path == @role_three_path
|
44
|
-
end
|
45
|
-
|
46
|
-
tests('#create', 'defaults path to /').succeeds do
|
47
|
-
@role_four = @iam.roles.create(:rolename => @role_four_name)
|
48
|
-
@role_four.path == '/'
|
49
|
-
end
|
50
|
-
|
51
|
-
tests('#destroy','an existing role').succeeds do
|
52
|
-
@iam.roles.get(@role_one_name).destroy
|
53
|
-
end
|
54
|
-
|
55
|
-
tests('#all', 'limit 1').succeeds do
|
56
|
-
1 == @iam.roles.all(:limit => 1).size
|
57
|
-
end
|
58
|
-
|
59
|
-
tests('#all', 'each_entry').succeeds do
|
60
|
-
roles = []; @iam.roles.each(:limit => 1) { |r| roles << r }
|
61
|
-
|
62
|
-
3 == roles.size
|
63
|
-
end
|
64
|
-
|
65
|
-
tests('#destroy','clean up remaining roles').succeeds do
|
66
|
-
@iam.roles.get(@role_two_name).destroy
|
67
|
-
@iam.roles.get(@role_three_name).destroy
|
68
|
-
@iam.roles.get(@role_four_name).destroy
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|
@@ -1,119 +0,0 @@
|
|
1
|
-
Shindo.tests("Fog::Compute[:iam] | users", ['aws','iam']) do
|
2
|
-
|
3
|
-
iam = Fog::AWS[:iam]
|
4
|
-
|
5
|
-
user_one_name = 'fake_user_one'
|
6
|
-
user_two_name = 'fake_user_two'
|
7
|
-
user_three_name = 'fake_user_three'
|
8
|
-
user_three_path = '/path/to/fake_user_three/'
|
9
|
-
user_four_name = 'fake_user_four'
|
10
|
-
|
11
|
-
def all_users
|
12
|
-
Fog::AWS[:iam].users.all.select{|user| user.id =~ /^fake_user/ }
|
13
|
-
end
|
14
|
-
|
15
|
-
tests('#create').succeeds do
|
16
|
-
user_one = iam.users.create(:id => user_one_name)
|
17
|
-
user_one.id == user_one_name
|
18
|
-
end
|
19
|
-
|
20
|
-
tests('#all','there is only one user').succeeds do
|
21
|
-
all_users.size == 1
|
22
|
-
end
|
23
|
-
|
24
|
-
tests('#all','the only user should match').succeeds do
|
25
|
-
all_users.first.id == user_one_name
|
26
|
-
end
|
27
|
-
|
28
|
-
tests('#create','a second user').succeeds do
|
29
|
-
user_two = iam.users.create(:id => user_two_name)
|
30
|
-
user_two.id == user_two_name
|
31
|
-
end
|
32
|
-
|
33
|
-
tests('#all','there are two users').succeeds do
|
34
|
-
all_users.size == 2
|
35
|
-
end
|
36
|
-
|
37
|
-
user = iam.users.get(user_one_name)
|
38
|
-
|
39
|
-
tests('#get','an existing user').succeeds do
|
40
|
-
user.id == user_one_name
|
41
|
-
end
|
42
|
-
|
43
|
-
tests('#current').succeeds do
|
44
|
-
iam.users.current
|
45
|
-
end
|
46
|
-
|
47
|
-
tests('#get',"returns nil if the user doesn't exists").succeeds do
|
48
|
-
iam.users.get('non-exists') == nil
|
49
|
-
end
|
50
|
-
|
51
|
-
tests('#policies','it has no policies').succeeds do
|
52
|
-
user.policies.empty?
|
53
|
-
end
|
54
|
-
|
55
|
-
tests('#access_keys','it has no keys').succeeds do
|
56
|
-
user.access_keys.empty?
|
57
|
-
end
|
58
|
-
|
59
|
-
# test that users create in mock and be signed in via access key and share data
|
60
|
-
if Fog.mocking?
|
61
|
-
tests("mocking access key usage") do
|
62
|
-
access_key = user.access_keys.create
|
63
|
-
|
64
|
-
user_client = Fog::AWS::IAM.new(
|
65
|
-
:aws_access_key_id => access_key.identity,
|
66
|
-
:aws_secret_access_key => access_key.secret_access_key
|
67
|
-
)
|
68
|
-
|
69
|
-
tests("sets correct data").succeeds do
|
70
|
-
user_client.users.size > 1
|
71
|
-
end
|
72
|
-
|
73
|
-
tests("set current user name").succeeds do
|
74
|
-
user_client.current_user_name == user.identity
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
tests('#password=nil', 'without a password').succeeds do
|
80
|
-
user.password = nil
|
81
|
-
user.password_created_at.nil?
|
82
|
-
end
|
83
|
-
|
84
|
-
tests('#password=(password)').succeeds do
|
85
|
-
user.password = SecureRandom.base64(10)
|
86
|
-
|
87
|
-
user.password_created_at.is_a?(Time)
|
88
|
-
end
|
89
|
-
|
90
|
-
tests('#password=(update_password)').succeeds do
|
91
|
-
user.password = SecureRandom.base64(10)
|
92
|
-
|
93
|
-
user.password_created_at.is_a?(Time)
|
94
|
-
end
|
95
|
-
|
96
|
-
tests('#password=nil', 'with a password').succeeds do
|
97
|
-
user.password = nil
|
98
|
-
user.password_created_at.nil?
|
99
|
-
end
|
100
|
-
|
101
|
-
tests('#create', 'assigns path').succeeds do
|
102
|
-
user_three = iam.users.create(:id => user_three_name, :path => user_three_path)
|
103
|
-
user_three.path == user_three_path
|
104
|
-
end
|
105
|
-
|
106
|
-
tests('#create', 'defaults path to /').succeeds do
|
107
|
-
user_four = iam.users.create(:id => user_four_name)
|
108
|
-
user_four.path == '/'
|
109
|
-
end
|
110
|
-
|
111
|
-
tests('#destroy','an existing user').succeeds do
|
112
|
-
iam.users.get(user_one_name).destroy
|
113
|
-
end
|
114
|
-
|
115
|
-
tests('#destroy','clean up remaining user').succeeds do
|
116
|
-
iam.users.get(user_two_name).destroy
|
117
|
-
end
|
118
|
-
|
119
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
Shindo.tests("AWS::RDS | cluster", ["aws", "rds"]) do
|
2
|
-
model_tests(Fog::AWS[:rds].clusters, rds_default_cluster_params) do
|
3
|
-
@cluster_id = @instance.id
|
4
|
-
@instance.wait_for(20*60) { ready? }
|
5
|
-
@cluster_with_final_snapshot = Fog::AWS[:rds].clusters.create(rds_default_cluster_params.merge(:id => uniq_id("fog-snapshot-test"), :backup_retention_period => 1))
|
6
|
-
|
7
|
-
tests("#servers") do
|
8
|
-
returns([]) { @instance.servers }
|
9
|
-
end
|
10
|
-
|
11
|
-
@server = Fog::AWS[:rds].servers.create(rds_default_server_params.reject { |k,v| [:allocated_storage, :master_username, :password, :backup_retention_period].include?(k) }.merge(:engine => "aurora", :cluster_id => @instance.id, :flavor_id => "db.r3.large"))
|
12
|
-
@server.wait_for(20*60) { ready? }
|
13
|
-
|
14
|
-
tests("#servers") do
|
15
|
-
@instance.reload
|
16
|
-
returns([{"DBInstanceIdentifier" => @server.id, "master" => true}]) { @instance.db_cluster_members }
|
17
|
-
returns([@server]) { @instance.servers }
|
18
|
-
end
|
19
|
-
|
20
|
-
tests("#snapshots") do
|
21
|
-
returns([]) { @instance.snapshots }
|
22
|
-
|
23
|
-
snapshot_id = uniq_id("manual-snapshot")
|
24
|
-
snapshot = @instance.snapshots.create(:id => snapshot_id)
|
25
|
-
returns(snapshot_id) { snapshot.id }
|
26
|
-
snapshot.wait_for { ready? }
|
27
|
-
returns([snapshot.id]) { @instance.snapshots.map(&:id) }
|
28
|
-
snapshot.destroy
|
29
|
-
end
|
30
|
-
|
31
|
-
tests("#destroy") do
|
32
|
-
snapshot_id = uniq_id("fog-snapshot")
|
33
|
-
|
34
|
-
@instance.servers.map(&:destroy)
|
35
|
-
|
36
|
-
@cluster_with_final_snapshot.wait_for(20*60) { ready? }
|
37
|
-
@cluster_with_final_snapshot.destroy(snapshot_id)
|
38
|
-
|
39
|
-
snapshot = Fog::AWS[:rds].cluster_snapshots.get(snapshot_id)
|
40
|
-
snapshot.wait_for { ready? }
|
41
|
-
returns(snapshot_id) { snapshot.id }
|
42
|
-
snapshot.destroy
|
43
|
-
end
|
44
|
-
|
45
|
-
after do
|
46
|
-
if cluster = Fog::AWS[:rds].clusters.get(@cluster_id)
|
47
|
-
unless cluster.state = 'deleting'
|
48
|
-
cluster.servers.map(&:destroy)
|
49
|
-
cluster.destroy
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
Shindo.tests("AWS::RDS | event_subscription", ['aws', 'rds']) do
|
2
|
-
pending unless Fog.mocking?
|
3
|
-
|
4
|
-
name = 'fog'
|
5
|
-
params = {:id => name, :sns_topic_arn => 'arn:aws:sns:us-east-1:12345678910:fog'}
|
6
|
-
|
7
|
-
model_tests(Fog::AWS[:rds].event_subscriptions, params) do
|
8
|
-
end
|
9
|
-
end
|
data/tests/models/rds/helper.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
def rds_default_server_params
|
2
|
-
{
|
3
|
-
:allocated_storage => 5,
|
4
|
-
:backup_retention_period => 0,
|
5
|
-
:engine => 'mysql',
|
6
|
-
:version => '5.6.22',
|
7
|
-
:id => uniq_id,
|
8
|
-
:master_username => 'foguser',
|
9
|
-
:password => 'fogpassword',
|
10
|
-
:flavor_id => 'db.m3.medium',
|
11
|
-
}
|
12
|
-
end
|
13
|
-
|
14
|
-
def rds_default_cluster_params
|
15
|
-
{
|
16
|
-
:allocated_storage => 50,
|
17
|
-
:backup_retention_period => 10,
|
18
|
-
:engine => "aurora",
|
19
|
-
:version => "5.6.10a",
|
20
|
-
:id => uniq_id,
|
21
|
-
:master_username => "fogclusteruser",
|
22
|
-
:password => "fogpassword",
|
23
|
-
:flavor_id => "db.r3.large"
|
24
|
-
}
|
25
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
Shindo.tests("AWS::RDS | db instance options", ['aws', 'rds']) do
|
2
|
-
|
3
|
-
params = {:engine => 'mysql'}
|
4
|
-
|
5
|
-
pending if Fog.mocking?
|
6
|
-
|
7
|
-
tests('#options') do
|
8
|
-
tests 'contains options' do
|
9
|
-
@instance = Fog::AWS[:rds].instance_options.new(params)
|
10
|
-
returns(true) { @instance.engine == 'mysql' }
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
Shindo.tests("AWS::RDS | parameter_group", ['aws', 'rds']) do
|
2
|
-
|
3
|
-
group_name = 'fog-test'
|
4
|
-
params = {:id => group_name, :family => 'mysql5.1', :description => group_name}
|
5
|
-
|
6
|
-
pending if Fog.mocking?
|
7
|
-
model_tests(Fog::AWS[:rds].parameter_groups, params, false) do
|
8
|
-
tests('#parameters') do
|
9
|
-
#search for a sample parameter
|
10
|
-
tests 'contains parameters' do
|
11
|
-
returns(true){ @instance.parameters.any? {|p| p.name == 'query_cache_size'}}
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
tests('#modify') do
|
16
|
-
@instance.modify([{:name => 'query_cache_size', :value => '6553600', :apply_method => 'immediate'}])
|
17
|
-
|
18
|
-
tests 'parameter has changed' do
|
19
|
-
returns('6553600'){@instance.parameters.find {|p| p.name == 'query_cache_size'}.value}
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
Shindo.tests("AWS::RDS | parameter_groups", ['aws', 'rds']) do
|
2
|
-
|
3
|
-
group_name = 'fog-test'
|
4
|
-
params = {:id => group_name, :family => 'mysql5.1', :description => group_name}
|
5
|
-
|
6
|
-
pending if Fog.mocking?
|
7
|
-
collection_tests(Fog::AWS[:rds].parameter_groups, params, false)
|
8
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
Shindo.tests("AWS::RDS | security_group", ['aws', 'rds']) do
|
2
|
-
group_name = 'fog-test'
|
3
|
-
params = {:id => group_name, :description => 'fog test'}
|
4
|
-
|
5
|
-
model_tests(Fog::AWS[:rds].security_groups, params) do
|
6
|
-
|
7
|
-
tests("#description").returns('fog test') { @instance.description }
|
8
|
-
|
9
|
-
@ec2_sec_group = Fog::Compute[:aws].security_groups.create(:name => uniq_id("fog-rds-test"), :description => 'fog test')
|
10
|
-
|
11
|
-
tests("#authorize_ec2_security_group('#{@ec2_sec_group.name}')").succeeds do
|
12
|
-
@instance.authorize_ec2_security_group(@ec2_sec_group.name)
|
13
|
-
returns('authorizing') do
|
14
|
-
@instance.ec2_security_groups.find{|h| h['EC2SecurityGroupName'] == @ec2_sec_group.name}['Status']
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
@instance.wait_for { ready? }
|
19
|
-
|
20
|
-
tests("#revoke_ec2_security_group('#{@ec2_sec_group.name}')").succeeds do
|
21
|
-
@instance.revoke_ec2_security_group(@ec2_sec_group.name)
|
22
|
-
|
23
|
-
returns('revoking') do
|
24
|
-
@instance.ec2_security_groups.find{|h| h['EC2SecurityGroupName'] == @ec2_sec_group.name}['Status']
|
25
|
-
end
|
26
|
-
|
27
|
-
@instance.wait_for { ready? }
|
28
|
-
|
29
|
-
returns(false) { @instance.ec2_security_groups.any?{|h| h['EC2SecurityGroupName'] == @ec2_sec_group.name} }
|
30
|
-
end
|
31
|
-
|
32
|
-
@instance.wait_for { ready? }
|
33
|
-
|
34
|
-
tests("#authorize_ec2_security_group('#{@ec2_sec_group.group_id}')").succeeds do
|
35
|
-
@instance.authorize_ec2_security_group(@ec2_sec_group.group_id)
|
36
|
-
returns('authorizing') do
|
37
|
-
@instance.ec2_security_groups.find{|h| h['EC2SecurityGroupName'] == @ec2_sec_group.name}['Status']
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
@instance.wait_for { ready? }
|
42
|
-
|
43
|
-
tests("#revoke_ec2_security_group('#{@ec2_sec_group.group_id}')").succeeds do
|
44
|
-
@instance.revoke_ec2_security_group(@ec2_sec_group.group_id)
|
45
|
-
|
46
|
-
returns('revoking') do
|
47
|
-
@instance.ec2_security_groups.find{|h| h['EC2SecurityGroupName'] == @ec2_sec_group.name}['Status']
|
48
|
-
end
|
49
|
-
|
50
|
-
@instance.wait_for { ready? }
|
51
|
-
|
52
|
-
returns(false) { @instance.ec2_security_groups.any?{|h| h['EC2SecurityGroupId'] == @ec2_sec_group.group_id} }
|
53
|
-
end
|
54
|
-
|
55
|
-
@instance.wait_for { ready? }
|
56
|
-
|
57
|
-
@ec2_sec_group.destroy
|
58
|
-
|
59
|
-
tests("#authorize_cidrip").succeeds do
|
60
|
-
@cidr = '127.0.0.1/32'
|
61
|
-
@instance.authorize_cidrip(@cidr)
|
62
|
-
returns('authorizing') { @instance.ip_ranges.find{|h| h['CIDRIP'] == @cidr}['Status'] }
|
63
|
-
end
|
64
|
-
|
65
|
-
tests("#revoke_cidrip").succeeds do
|
66
|
-
pending if Fog.mocking?
|
67
|
-
|
68
|
-
@instance.wait_for { ready? }
|
69
|
-
@instance.revoke_cidrip(@cidr)
|
70
|
-
returns('revoking') { @instance.ip_ranges.find{|h| h['CIDRIP'] == @cidr}['Status'] }
|
71
|
-
@instance.wait_for { ready? }
|
72
|
-
returns(false) { @instance.ip_ranges.any?{|h| h['CIDRIP'] == @cidr} }
|
73
|
-
|
74
|
-
end
|
75
|
-
|
76
|
-
end
|
77
|
-
end
|
@@ -1,131 +0,0 @@
|
|
1
|
-
Shindo.tests("AWS::RDS | server", ['aws', 'rds']) do
|
2
|
-
model_tests(Fog::AWS[:rds].servers, rds_default_server_params) do
|
3
|
-
# We'll need this later; create it early to avoid waiting
|
4
|
-
@instance_with_final_snapshot = Fog::AWS[:rds].servers.create(rds_default_server_params.merge(:id => uniq_id("fog-snapshot-test"), :backup_retention_period => 1))
|
5
|
-
@instance_with_encrypted_storage = Fog::AWS[:rds].servers.create(rds_default_server_params.merge(:storage_encrypted => true))
|
6
|
-
|
7
|
-
@instance.wait_for(20*60) { ready? }
|
8
|
-
@instance_with_encrypted_storage.wait_for(20*60) { ready? }
|
9
|
-
@final_snapshot_id = uniq_id('fog-test-snapshot')
|
10
|
-
|
11
|
-
tests("#storage_encrypted") do
|
12
|
-
returns(true) { @instance_with_encrypted_storage.storage_encrypted }
|
13
|
-
end
|
14
|
-
|
15
|
-
test('#read_replica_identifiers is []') do
|
16
|
-
returns([]) { @instance.read_replica_identifiers }
|
17
|
-
end
|
18
|
-
|
19
|
-
tests('#snapshots') do
|
20
|
-
snapshot = nil
|
21
|
-
|
22
|
-
tests('#create').succeeds do
|
23
|
-
snapshot = @instance.snapshots.create(:id => uniq_id('fog-snapshot-test'))
|
24
|
-
end
|
25
|
-
|
26
|
-
snapshot.wait_for { ready?}
|
27
|
-
|
28
|
-
@instance.wait_for { ready? }
|
29
|
-
|
30
|
-
returns(true) { @instance.snapshots.map{ |s| s.id }.include?(snapshot.id) }
|
31
|
-
snapshot.destroy
|
32
|
-
end
|
33
|
-
|
34
|
-
tests("#modify").succeeds do
|
35
|
-
pending if Fog.mocking?
|
36
|
-
|
37
|
-
engine = rds_default_server_params.fetch(:engine)
|
38
|
-
version = rds_default_server_params.fetch(:version).match(/\d+\.\d+/).to_s
|
39
|
-
|
40
|
-
orig_parameter_group = @instance.db_parameter_groups.first['DBParameterGroupName']
|
41
|
-
parameter_group = Fog::AWS[:rds].parameter_groups.create(:id => uniq_id, :family => "#{engine}#{version}", :description => 'fog-test')
|
42
|
-
|
43
|
-
orig_security_groups = @instance.db_security_groups.map{|h| h['DBSecurityGroupName']}
|
44
|
-
security_group = Fog::AWS[:rds].security_groups.create(:id => uniq_id, :description => 'fog-test')
|
45
|
-
|
46
|
-
modify_options = {
|
47
|
-
'DBParameterGroupName' => parameter_group.id,
|
48
|
-
'DBSecurityGroups' => orig_security_groups + [security_group.id]
|
49
|
-
}
|
50
|
-
|
51
|
-
@instance.modify(true, modify_options)
|
52
|
-
@instance.wait_for { ready? }
|
53
|
-
|
54
|
-
returns(parameter_group.id, 'new parameter group') do
|
55
|
-
@instance.db_parameter_groups.first['DBParameterGroupName']
|
56
|
-
end
|
57
|
-
|
58
|
-
returns(true, "new security group") do
|
59
|
-
@instance.db_security_groups.any?{|hash| hash['DBSecurityGroupName'] == security_group.id}
|
60
|
-
end
|
61
|
-
|
62
|
-
@instance.reboot
|
63
|
-
@instance.wait_for { state == 'rebooting' }
|
64
|
-
@instance.wait_for { ready? }
|
65
|
-
|
66
|
-
# Restore back to original state using symbols
|
67
|
-
restore_options = {
|
68
|
-
:parameter_group_name => orig_parameter_group,
|
69
|
-
:security_group_names => orig_security_groups
|
70
|
-
}
|
71
|
-
@instance.modify(true, restore_options)
|
72
|
-
|
73
|
-
@instance.reboot
|
74
|
-
@instance.wait_for { state == 'rebooting' }
|
75
|
-
@instance.wait_for do
|
76
|
-
ready? &&
|
77
|
-
db_security_groups.all? {|hash| hash['Status'] == 'active'} &&
|
78
|
-
db_parameter_groups.all? {|hash| hash['ParameterApplyStatus'] == 'in-sync' }
|
79
|
-
end
|
80
|
-
|
81
|
-
parameter_group.destroy
|
82
|
-
security_group.destroy
|
83
|
-
end
|
84
|
-
|
85
|
-
tests("#reboot").succeeds do
|
86
|
-
@instance.reboot
|
87
|
-
end
|
88
|
-
@instance.wait_for { state == 'rebooting' }
|
89
|
-
@instance.wait_for { ready? }
|
90
|
-
|
91
|
-
replica = nil
|
92
|
-
|
93
|
-
tests('#create_read_replica').succeeds do
|
94
|
-
replica = @instance_with_final_snapshot.create_read_replica(uniq_id('fog-replica'))
|
95
|
-
@instance_with_final_snapshot.reload
|
96
|
-
returns([replica.id]) { @instance_with_final_snapshot.read_replica_identifiers }
|
97
|
-
returns(@instance_with_final_snapshot.id) { replica.read_replica_source }
|
98
|
-
|
99
|
-
replica.wait_for { ready? }
|
100
|
-
|
101
|
-
# FinalDBSnapshotIdentifier can not be specified when deleting a replica instance
|
102
|
-
raises(Fog::AWS::RDS::Error) { replica.destroy("foobar") }
|
103
|
-
end
|
104
|
-
|
105
|
-
tests('#promote_read_replica').succeeds do
|
106
|
-
replica.promote.wait_for { state != "modifying" }
|
107
|
-
|
108
|
-
replica.read_replica_source == nil
|
109
|
-
end
|
110
|
-
|
111
|
-
tests('#promote_read_replica', 'master').raises(Fog::AWS::RDS::Error) {
|
112
|
-
@instance_with_final_snapshot.promote
|
113
|
-
}
|
114
|
-
|
115
|
-
replica && replica.destroy
|
116
|
-
|
117
|
-
test("Destroying with a final snapshot") do
|
118
|
-
|
119
|
-
@instance_with_final_snapshot.wait_for { ready? }
|
120
|
-
@instance_with_final_snapshot.destroy(@final_snapshot_id)
|
121
|
-
returns(true, "Final snapshot created") do
|
122
|
-
@final_snapshot = Fog::AWS[:rds].snapshots.get(@final_snapshot_id)
|
123
|
-
!@final_snapshot.nil?
|
124
|
-
end
|
125
|
-
|
126
|
-
@final_snapshot.wait_for { ready? }
|
127
|
-
@final_snapshot.destroy
|
128
|
-
end
|
129
|
-
|
130
|
-
end
|
131
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
Shindo.tests("AWS::RDS | servers", ['aws', 'rds']) do
|
2
|
-
|
3
|
-
collection_tests(Fog::AWS[:rds].servers, rds_default_server_params) do
|
4
|
-
@instance.wait_for { ready? }
|
5
|
-
end
|
6
|
-
|
7
|
-
tests("#restore").succeeds do
|
8
|
-
instance = Fog::AWS[:rds].servers.create(rds_default_server_params.merge(:id => uniq_id("fog-snapshot-test")))
|
9
|
-
|
10
|
-
snapshot_id = uniq_id('fog-snapshot-test')
|
11
|
-
@snapshot = instance.snapshots.create(:id => snapshot_id )
|
12
|
-
instance.destroy
|
13
|
-
|
14
|
-
db_name = uniq_id('fog-db-name')
|
15
|
-
@restore_instance = Fog::AWS[:rds].servers.restore('master_username' => instance.master_username, 'flavor_id' => 'db.m3.medium', 'source_snapshot_id' => snapshot_id, 'id' => uniq_id('restored-instance'))
|
16
|
-
end
|
17
|
-
|
18
|
-
if Fog.mocking? && @restore_instance.respond_to?(:ready?)
|
19
|
-
@restore_instance.wait_for { ready? }
|
20
|
-
end
|
21
|
-
|
22
|
-
@snapshot.destroy
|
23
|
-
@restore_instance.destroy
|
24
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
Shindo.tests("AWS::RDS | snapshot", ['aws', 'rds']) do
|
2
|
-
|
3
|
-
@server = Fog::AWS[:rds].servers.create(rds_default_server_params)
|
4
|
-
@server.wait_for { ready? }
|
5
|
-
|
6
|
-
params = {:id => uniq_id, :instance_id => @server.id}
|
7
|
-
model_tests(Fog::AWS[:rds].snapshots, params) do
|
8
|
-
@instance.wait_for { ready? }
|
9
|
-
end
|
10
|
-
|
11
|
-
@server.destroy
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
Shindo.tests("AWS::RDS | snapshots", ['aws', 'rds']) do
|
2
|
-
|
3
|
-
@server = Fog::AWS[:rds].servers.create(rds_default_server_params)
|
4
|
-
@server.wait_for { ready? }
|
5
|
-
|
6
|
-
params = {:id => uniq_id, :instance_id => @server.id}
|
7
|
-
collection_tests(Fog::AWS[:rds].snapshots, params) do
|
8
|
-
@instance.wait_for { ready? }
|
9
|
-
end
|
10
|
-
|
11
|
-
@server.destroy
|
12
|
-
end
|