source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/auto_scaling/configurations_tests.rb
Ruby
mit
304
master
264
Shindo.tests('AWS::AutoScaling | configurations', ['aws', 'auto_scaling_m']) do params = { :id => uniq_id, :image_id => 'ami-8c1fece5', :instance_type => 't1.micro' } collection_tests(Fog::AWS[:auto_scaling].configurations, params, false) end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/auto_scaling/configuration_test.rb
Ruby
mit
304
master
301
Shindo.tests('AWS::AutoScaling | configuration', ['aws', 'auto_scaling_m']) do params = { :id => uniq_id, :image_id => 'ami-8c1fece5', :instance_type => 't1.micro' } model_tests(Fog::AWS[:auto_scaling].configurations, params, false) do @instance.wait_for { ready? } end end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/auto_scaling/instance_tests.rb
Ruby
mit
304
master
380
require 'fog/aws/models/auto_scaling/instance' Shindo.tests("Fog::AWS::AutoScaling::Instance", 'aws') do @instance = Fog::AWS::AutoScaling::Instance.new test('#healthy? = true') do @instance.health_status = 'Healthy' @instance.healthy? == true end test('#heatlhy? = false') do @instance.health_sta...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/beanstalk/version_tests.rb
Ruby
mit
304
master
1,855
Shindo.tests("Fog::AWS[:beanstalk] | version", ['aws', 'beanstalk']) do pending if Fog.mocking? @beanstalk = Fog::AWS[:beanstalk] @application_name = uniq_id('fog-test-app') @version_name = uniq_id('fog-test-version') @version_description = 'A nice description' @application = @beanstalk.applications.cr...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/beanstalk/versions_tests.rb
Ruby
mit
304
master
1,368
Shindo.tests("Fog::AWS[:beanstalk] | versions", ['aws', 'beanstalk']) do pending if Fog.mocking? @beanstalk = Fog::AWS[:beanstalk] @application_name = uniq_id('fog-test-app') @version_name = uniq_id('fog-test-version') @version_description = 'A nice description' @application = @beanstalk.applications.c...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/beanstalk/environments_tests.rb
Ruby
mit
304
master
1,029
Shindo.tests("Fog::AWS[:beanstalk] | environments", ['aws', 'beanstalk']) do pending if Fog.mocking? @beanstalk = Fog::AWS[:beanstalk] @application_name = uniq_id('fog-test-app') @environment_name = uniq_id('fog-test-env') @version_name = uniq_id('fog-test-version') # Create an application/version to us...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/beanstalk/applications_tests.rb
Ruby
mit
304
master
207
Shindo.tests("Fog::AWS[:beanstalk] | applications", ['aws', 'beanstalk']) do pending if Fog.mocking? collection_tests(Fog::AWS[:beanstalk].applications, {:name => uniq_id('fog-test-app')}, false) end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/beanstalk/template_tests.rb
Ruby
mit
304
master
1,315
Shindo.tests("Fog::AWS[:beanstalk] | template", ['aws', 'beanstalk']) do pending if Fog.mocking? @beanstalk = Fog::AWS[:beanstalk] @application_name = uniq_id('fog-test-app') @template_name = uniq_id('fog-test-template') @template_description = 'A nice description' @application = @beanstalk.application...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/beanstalk/environment_tests.rb
Ruby
mit
304
master
3,378
Shindo.tests("Fog::AWS[:beanstalk] | environment", ['aws', 'beanstalk']) do pending if Fog.mocking? @beanstalk = Fog::AWS[:beanstalk] @application_name = uniq_id('fog-test-app') @environment_name = uniq_id('fog-test-env') @version_names = [] # Create two unique version names 2.times { @version_name...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/beanstalk/application_tests.rb
Ruby
mit
304
master
1,873
Shindo.tests("Fog::AWS[:beanstalk] | application", ['aws', 'beanstalk']) do pending if Fog.mocking? @application_opts = { :name => uniq_id('fog-test-app'), :description => 'A nice description.' } model_tests(Fog::AWS[:beanstalk].applications, @application_opts, false) do test("#attributes") ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/beanstalk/templates_tests.rb
Ruby
mit
304
master
1,448
Shindo.tests("Fog::AWS[:beanstalk] | templates", ['aws', 'beanstalk']) do pending if Fog.mocking? @beanstalk = Fog::AWS[:beanstalk] @application_name = uniq_id('fog-test-app') @template_name = uniq_id('fog-test-template') @template_description = 'A nice description' @application = @beanstalk.applicatio...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/server_tests.rb
Ruby
mit
304
master
4,563
Shindo.tests("AWS::RDS | server", ['aws', 'rds']) do model_tests(Fog::AWS[:rds].servers, rds_default_server_params) do # We'll need this later; create it early to avoid waiting @instance_with_final_snapshot = Fog::AWS[:rds].servers.create(rds_default_server_params.merge(:id => uniq_id("fog-snapshot-test"), :b...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/helper.rb
Ruby
mit
304
master
759
def rds_default_server_params { :allocated_storage => 5, :backup_retention_period => 0, :engine => 'mysql', :version => '5.6.22', :id => uniq_id, :master_username => 'foguser', :password => 'fogpassword', ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/tagging_tests.rb
Ruby
mit
304
master
734
Shindo.tests("AWS::RDS | tagging", ['aws', 'rds']) do @server = Fog::AWS[:rds].servers.create(rds_default_server_params) Fog::Formatador.display_line "Creating RDS instance #{@server.id}" Fog::Formatador.display_line "Waiting for instance #{@server.id} to be ready" @server.wait_for { ready? } tags1 = {'key1...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/instance_option_tests.rb
Ruby
mit
304
master
315
Shindo.tests("AWS::RDS | db instance options", ['aws', 'rds']) do params = {:engine => 'mysql'} pending if Fog.mocking? tests('#options') do tests 'contains options' do @instance = Fog::AWS[:rds].instance_options.new(params) returns(true) { @instance.engine == 'mysql' } end end end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/event_subscriptions_tests.rb
Ruby
mit
304
master
249
Shindo.tests("AWS::RDS | event subscriptions", ['aws', 'rds']) do pending unless Fog.mocking? params = {:id => "fog", :sns_topic_arn => 'arn:aws:sns:us-east-1:12345678910:fog'} collection_tests(Fog::AWS[:rds].event_subscriptions, params) end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/servers_tests.rb
Ruby
mit
304
master
862
Shindo.tests("AWS::RDS | servers", ['aws', 'rds']) do collection_tests(Fog::AWS[:rds].servers, rds_default_server_params) do @instance.wait_for { ready? } end tests("#restore").succeeds do instance = Fog::AWS[:rds].servers.create(rds_default_server_params.merge(:id => uniq_id("fog-snapshot-test"))) ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/parameter_groups_tests.rb
Ruby
mit
304
master
270
Shindo.tests("AWS::RDS | parameter_groups", ['aws', 'rds']) do group_name = 'fog-test' params = {:id => group_name, :family => 'mysql5.1', :description => group_name} pending if Fog.mocking? collection_tests(Fog::AWS[:rds].parameter_groups, params, false) end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/cluster_tests.rb
Ruby
mit
304
master
1,933
Shindo.tests("AWS::RDS | cluster", ["aws", "rds"]) do model_tests(Fog::AWS[:rds].clusters, rds_default_cluster_params) do @cluster_id = @instance.id @instance.wait_for(20*60) { ready? } @cluster_with_final_snapshot = Fog::AWS[:rds].clusters.create(rds_default_cluster_params.merge(:id => uniq_id("fog-snaps...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/event_subscription_tests.rb
Ruby
mit
304
master
267
Shindo.tests("AWS::RDS | event_subscription", ['aws', 'rds']) do pending unless Fog.mocking? name = 'fog' params = {:id => name, :sns_topic_arn => 'arn:aws:sns:us-east-1:12345678910:fog'} model_tests(Fog::AWS[:rds].event_subscriptions, params) do end end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/snapshot_tests.rb
Ruby
mit
304
master
326
Shindo.tests("AWS::RDS | snapshot", ['aws', 'rds']) do @server = Fog::AWS[:rds].servers.create(rds_default_server_params) @server.wait_for { ready? } params = {:id => uniq_id, :instance_id => @server.id} model_tests(Fog::AWS[:rds].snapshots, params) do @instance.wait_for { ready? } end @server.destro...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/parameter_group_tests.rb
Ruby
mit
304
master
764
Shindo.tests("AWS::RDS | parameter_group", ['aws', 'rds']) do group_name = 'fog-test' params = {:id => group_name, :family => 'mysql5.1', :description => group_name} pending if Fog.mocking? model_tests(Fog::AWS[:rds].parameter_groups, params, false) do tests('#parameters') do #search for a sample pa...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/snapshots_tests.rb
Ruby
mit
304
master
332
Shindo.tests("AWS::RDS | snapshots", ['aws', 'rds']) do @server = Fog::AWS[:rds].servers.create(rds_default_server_params) @server.wait_for { ready? } params = {:id => uniq_id, :instance_id => @server.id} collection_tests(Fog::AWS[:rds].snapshots, params) do @instance.wait_for { ready? } end @server....
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/models/rds/security_group_tests.rb
Ruby
mit
304
master
2,680
Shindo.tests("AWS::RDS | security_group", ['aws', 'rds']) do group_name = 'fog-test' params = {:id => group_name, :description => 'fog test'} model_tests(Fog::AWS[:rds].security_groups, params) do tests("#description").returns('fog test') { @instance.description } @ec2_sec_group = Fog::Compute[:aws].se...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/dns_helper.rb
Ruby
mit
304
master
997
def dns_providers { aws: { mocked: false }, bluebox: { mocked: false, zone_attributes: { ttl: 60 } }, dnsimple: { mocked: false }, dnsmadeeasy: { mocked: false }, dynect: { mocked: false, zone_attributes: { email: '...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/formats_helper_tests.rb
Ruby
mit
304
master
3,589
Shindo.tests('test_helper', 'meta') do tests('comparing welcome data against schema') do data = { welcome: 'Hello' } data_matches_schema(welcome: String) { data } end tests('#data_matches_schema') do tests('when value matches schema expectation') do data_matches_schema('key' => String) { { 'ke...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/collection_helper.rb
Ruby
mit
304
master
2,339
def collection_tests(collection, params = {}, mocks_implemented = true) tests('success') do tests("#new(#{params.inspect})").succeeds do pending if Fog.mocking? && !mocks_implemented collection.new(params) end tests("#create(#{params.inspect})").succeeds do pending if Fog.mocking? && !m...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/schema_validator_tests.rb
Ruby
mit
304
master
3,748
# frozen_string_literal: true Shindo.tests('Fog::Schema::DataValidator', 'meta') do validator = Fog::Schema::DataValidator.new tests('#validate') do tests('returns true') do returns(true, 'when value matches schema expectation') do validator.validate({ 'key' => 'Value' }, 'key' => String) ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/formats_helper.rb
Ruby
mit
304
master
3,579
# frozen_string_literal: true require 'fog/schema/data_validator' # format related hackery # allows both true.is_a?(Fog::Boolean) and false.is_a?(Fog::Boolean) # allows both nil.is_a?(Fog::Nullable::String) and ''.is_a?(Fog::Nullable::String) module Fog module Boolean; end module Nullable module Boolean; end ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/mock_helper.rb
Ruby
mit
304
master
6,060
# Use so you can run in mock mode from the command line # # FOG_MOCK=true fog if ENV["FOG_MOCK"] == "true" Fog.mock! end # if in mocked mode, fill in some fake credentials for us if Fog.mock? Fog.credentials = { aws_access_key_id: 'aws_access_key_id', aws_secret_access_key: 'aw...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/model_helper.rb
Ruby
mit
304
master
783
def model_tests(collection, params = {}, mocks_implemented = true) tests('success') do @instance = collection.new(params) tests('#save').succeeds do pending if Fog.mocking? && !mocks_implemented @instance.save end if block_given? yield(@instance) end tests('#destroy').succ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/responds_to_helper.rb
Ruby
mit
304
master
255
module Shindo class Tests def responds_to(method_names) [*method_names].each do |method_name| tests("#respond_to?(:#{method_name})").returns(true) do @instance.respond_to?(method_name) end end end end end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/compute/servers_helper.rb
Ruby
mit
304
master
262
def servers_tests(connection, params = {}, mocks_implemented = true) collection_tests(connection.servers, params, mocks_implemented) do if !Fog.mocking? || mocks_implemented @instance.wait_for { ready? } yield if block_given? end end end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/compute/flavors_helper.rb
Ruby
mit
304
master
815
def flavors_tests(connection, params = {}, mocks_implemented = true) tests('success') do tests('#all').succeeds do pending if Fog.mocking? && !mocks_implemented connection.flavors.all end if !Fog.mocking? || mocks_implemented @identity = connection.flavors.first.identity end te...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/helpers/compute/server_helper.rb
Ruby
mit
304
master
674
def server_tests(connection, params = {}, mocks_implemented = true) model_tests(connection.servers, params, mocks_implemented) do tests('#reload').returns(true) do pending if Fog.mocking? && !mocks_implemented @instance.wait_for { ready? } identity = @instance.identity !identity.nil? && id...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/group_tests.rb
Ruby
mit
304
master
973
Shindo.tests('AWS::IAM | group requests', ['aws']) do tests('success') do @group_format = { 'Group' => { 'Arn' => String, 'GroupId' => String, 'GroupName' => String, 'Path' => String }, 'RequestId' => String } tests("#create_group('fog_grou...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/account_policy_tests.rb
Ruby
mit
304
master
1,238
Shindo.tests('AWS::IAM | account policy requests', ['aws']) do tests('success') do tests("#update_account_password_policy(minimum_password_length, max_password_age, password_reuse_prevention,require_symbols,require_numbers,require_uppercase_characters, require_lowercase_characters,allow_users_to_change_password,...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/login_profile_tests.rb
Ruby
mit
304
master
1,923
Shindo.tests('AWS::IAM | user requests', ['aws']) do unless Fog.mocking? Fog::AWS[:iam].create_user('fog_user') end tests('success') do @login_profile_format = { 'LoginProfile' => { 'UserName' => String, 'CreateDate' => Time }, 'RequestId' => String } tests(...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/versioned_managed_policy_tests.rb
Ruby
mit
304
master
3,170
Shindo.tests('AWS::IAM | versioned managed policy requests', ['aws']) do pending if Fog.mocking? tests('success') do @policy = {'Version' => '2012-10-17', "Statement" => [{"Effect" => "Deny", "Action" => "*", "Resource" => "*"}]} @policy_v2 = {'Version' => '2012-10-17', "Statement" => [{"Effect" => "Allow...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/server_certificate_tests.rb
Ruby
mit
304
master
4,922
Shindo.tests('AWS::IAM | server certificate requests', ['aws']) do @key_name = 'fog-test' @key_name_chained = 'fog-test-chained' @certificate_format = { 'Arn' => String, 'Path' => String, 'ServerCertificateId' => String, 'ServerCertificateName' => String, 'UploadDate' => Time } @upload_fo...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/helper.rb
Ruby
mit
304
master
7,018
class AWS module IAM # A self-signed test keypair. Generated using the command: # openssl req -new -newkey rsa:1024 -days 3650 -nodes -x509 -keyout server-private.key -out server-public.crt # NB: Amazon returns an error on extraneous linebreaks SERVER_CERT = %{-----BEGIN CERTIFICATE----- MIIDQzCCAqygA...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/mfa_tests.rb
Ruby
mit
304
master
499
Shindo.tests('AWS::IAM | mfa requests', ['aws']) do tests('success') do @mfa_devices_format = { 'MFADevices' => [{ 'EnableDate' => Time, 'SerialNumber' => String, 'UserName' => String }], 'IsTruncated' => Fog::Boolean, 'RequestId' => String } te...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/access_key_tests.rb
Ruby
mit
304
master
1,685
Shindo.tests('AWS::IAM | access key requests', ['aws']) do Fog::AWS[:iam].create_user('fog_access_key_tests') tests('success') do @access_key_format = { 'AccessKey' => { 'AccessKeyId' => String, 'UserName' => String, 'SecretAccessKey' => String, 'Status' ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/instance_profile_tests.rb
Ruby
mit
304
master
1,748
include AWS::IAM::Formats Shindo.tests("AWS::IAM | instance profile requests", ['aws']) do tests('success') do profile_name = uniq_id('fog-instance-profile') @instance_profile_count = Fog::AWS[:iam].list_instance_profiles.body["InstanceProfiles"].count tests("#create_instance_profile('#{profile_name}')"...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/user_policy_tests.rb
Ruby
mit
304
master
1,417
Shindo.tests('AWS::IAM | user policy requests', ['aws']) do Fog::AWS[:iam].create_user('fog_user_policy_tests') tests('success') do @policy = {"Statement" => [{"Effect" => "Allow", "Action" => "*", "Resource" => "*"}]} tests("#put_user_policy('fog_user_policy_tests', 'fog_policy', #{@policy.inspect})")....
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/group_policy_tests.rb
Ruby
mit
304
master
1,531
Shindo.tests('AWS::IAM | group policy requests', ['aws']) do Fog::AWS[:iam].create_group('fog_group_policy_tests') tests('success') do @policy = {"Statement" => [{"Effect" => "Allow", "Action" => "*", "Resource" => "*"}]} tests("#put_group_policy('fog_group_policy_tests', 'fog_policy', #{@policy.inspect...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/user_tests.rb
Ruby
mit
304
master
2,261
Shindo.tests('AWS::IAM | user requests', ['aws']) do service = Fog::AWS[:iam] begin service.delete_group('fog_user_tests') rescue Fog::AWS::IAM::NotFound end begin service.delete_user('fog_user').body rescue Fog::AWS::IAM::NotFound end username = 'fog_user' service.create_group('fog_user_t...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/managed_policy_tests.rb
Ruby
mit
304
master
3,632
Shindo.tests('AWS::IAM | managed policy requests', ['aws']) do Fog::AWS[:iam].create_group('fog_policy_test_group') Fog::AWS[:iam].create_user('fog_policy_test_user') Fog::AWS[:iam].create_role('fog_policy_test_role', Fog::AWS::IAM::EC2_ASSUME_ROLE_POLICY) tests('success') do @policy = {'Version' => '2012...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/role_tests.rb
Ruby
mit
304
master
4,898
Shindo.tests('AWS::IAM | role requests', ['aws']) do tests('success') do @role = { 'Arn' => String, 'AssumeRolePolicyDocument' => String, 'CreateDate' => Time, 'Path' => String, 'RoleId' => String, ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/iam/account_tests.rb
Ruby
mit
304
master
1,236
Shindo.tests('AWS::IAM | account requests', ['aws']) do tests('success') do @get_account_summary_format = { 'Summary' => { 'AccessKeysPerUserQuota' => Integer, 'AccountMFAEnabled' => Integer, 'AssumeRolePolicySizeQuota' => Fog::Nullable::Integer, 'GroupPolicySizeQuota' => Int...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/glacier/archive_tests.rb
Ruby
mit
304
master
460
Shindo.tests('AWS::Glacier | glacier archive tests', ['aws']) do pending if Fog.mocking? Fog::AWS[:glacier].create_vault('Fog-Test-Vault-upload') tests('single part upload') do id = Fog::AWS[:glacier].create_archive('Fog-Test-Vault-upload', 'data body').headers['x-amz-archive-id'] Fog::AWS[:glacier].del...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/glacier/tree_hash_tests.rb
Ruby
mit
304
master
4,145
Shindo.tests('AWS::Glacier | glacier tree hash calcuation', ['aws']) do tests('tree_hash(single part < 1MB)') do returns(OpenSSL::Digest::SHA256.hexdigest('')) { Fog::AWS::Glacier::TreeHash.digest('')} end tests('tree_hash(multibyte characters)') do body = ("\xC2\xA1" * 1024*1024) body.force_encodin...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/glacier/vault_tests.rb
Ruby
mit
304
master
1,404
Shindo.tests('AWS::Glacier | glacier vault requests', ['aws']) do pending if Fog.mocking? topic_arn = Fog::AWS[:sns].create_topic( 'fog_test_glacier_topic').body['TopicArn'] Fog::AWS[:glacier].create_vault('Fog-Test-Vault') tests('list_vaults') do returns(true){Fog::AWS[:glacier].list_vaults.body['VaultLi...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/glacier/multipart_upload_tests.rb
Ruby
mit
304
master
1,558
Shindo.tests('AWS::Glacier | glacier archive tests', ['aws']) do pending if Fog.mocking? Fog::AWS[:glacier].create_vault('Fog-Test-Vault-upload') tests('initiate and abort') do id = Fog::AWS[:glacier].initiate_multipart_upload('Fog-Test-Vault-upload', 1024*1024).headers['x-amz-multipart-upload-id'] retu...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/ses/verified_email_address_tests.rb
Ruby
mit
304
master
846
Shindo.tests('AWS::SES | verified email address requests', ['aws', 'ses']) do tests('success') do tests("#verify_email_address('test@example.com')").formats(AWS::SES::Formats::BASIC) do pending if Fog.mocking? Fog::AWS[:ses].verify_email_address('test@example.com').body end tests("#list_ver...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/ses/verified_domain_identity_tests.rb
Ruby
mit
304
master
337
Shindo.tests('AWS::SES | verified domain identity requests', ['aws', 'ses']) do tests('success') do tests("#verify_domain_identity('example.com')").formats(AWS::SES::Formats::BASIC) do pending if Fog.mocking? Fog::AWS[:ses].verify_domain_identity('example.com').body end end tests('failure'...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/cloud_watch/put_metric_data_tests.rb
Ruby
mit
304
master
1,405
Shindo.tests('AWS::CloudWatch | metric requests', ['aws', 'cloudwatch']) do tests('success') do namespace = 'Custom/Test' @puts_format = {'ResponseMetadata' => {'RequestId' => String}} tests('#puts_value').formats(@puts_format) do pending if Fog.mocking? Fog::AWS[:cloud_watch].put_metric_dat...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/cloud_watch/list_metrics_test.rb
Ruby
mit
304
master
2,016
Shindo.tests('AWS::CloudWatch | metric requests', ['aws', 'cloudwatch']) do tests('success') do @metrics_list_format = { 'ListMetricsResult' => { 'Metrics' => [{ 'Dimensions' => [{ 'Name' => String, 'Value' => String }], ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/cloud_watch/get_metric_statistics_tests.rb
Ruby
mit
304
master
1,023
Shindo.tests('AWS::CloudWatch | metric requests', ['aws', 'cloudwatch']) do tests('success') do @metrics_statistic_format = { 'GetMetricStatisticsResult' => { 'Label' => String, 'Datapoints' => [{ "Timestamp" => Time, 'Unit' => String, 'Minimum' => Float, ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/simpledb/domain_tests.rb
Ruby
mit
304
master
1,567
Shindo.tests('AWS::SimpleDB | domain requests', ['aws']) do @domain_metadata_format = AWS::SimpleDB::Formats::BASIC.merge({ 'AttributeNameCount' => Integer, 'AttributeNamesSizeBytes' => Integer, 'AttributeValueCount' => Integer, 'AttributeValuesSizeBytes' => Integer, 'ItemCount' ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/simpledb/attributes_tests.rb
Ruby
mit
304
master
4,375
Shindo.tests('AWS::SimpleDB | attributes requests', ['aws']) do @domain_name = "fog_domain_#{Time.now.to_f.to_s.gsub('.','')}" Fog::AWS[:simpledb].create_domain(@domain_name) tests('success') do tests("#batch_put_attributes('#{@domain_name}', { 'a' => { 'b' => 'c', 'd' => 'e' }, 'x' => { 'y' => 'z' } }).b...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/ecs/task_tests.rb
Ruby
mit
304
master
5,752
require 'fog/json' Shindo.tests('AWS::ECS | task requests', ['aws', 'ecs']) do Fog::AWS[:ecs].reset_data tests('success') do tests("#list_tasks").formats(AWS::ECS::Formats::LIST_TASKS) do result = Fog::AWS[:ecs].list_tasks.body list_instances_arns = result['ListTasksResult']['taskArns'] re...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/ecs/helper.rb
Ruby
mit
304
master
9,829
class AWS module ECS module Formats BASIC = { 'ResponseMetadata' => { 'RequestId' => String } } CREATE_CLUSTER = BASIC.merge({ 'CreateClusterResult' => { 'cluster' => { 'clusterName' => String, 'clusterArn' ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/ecs/task_definitions_tests.rb
Ruby
mit
304
master
4,250
require 'fog/json' Shindo.tests('AWS::ECS | task definitions requests', ['aws', 'ecs']) do Fog::AWS[:ecs].reset_data tests('success') do tests("#list_task_definitions").formats(AWS::ECS::Formats::LIST_TASK_DEFINITIONS) do result = Fog::AWS[:ecs].list_task_definitions.body list_task_def_arns = re...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/ecs/service_tests.rb
Ruby
mit
304
master
4,971
Shindo.tests('AWS::ECS | service requests', ['aws', 'ecs']) do Fog::AWS[:ecs].reset_data cluster = 'arn:aws:ecs:us-east-1:994922842243:cluster/default' desired_count = 1 role = 'arn:aws:iam::806753142346:role/ecsServiceRole' service_name = 'sample-webapp' task_definition = 'console-sample-app-static:18' ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/ecs/container_instance_tests.rb
Ruby
mit
304
master
4,501
Shindo.tests('AWS::ECS | container instance requests', ['aws', 'ecs']) do Fog::AWS[:ecs].reset_data container_instance_arn = 'arn:aws:ecs:us-west-2:738152598183:container-instance/eff1068d-5fcb-4804-89f0-7d18ffc6879c' ec2_instance_id = 'i-58f4b4ae' Fog::AWS[:ecs].data[:container_instances] << { 'remainin...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/ecs/cluster_tests.rb
Ruby
mit
304
master
4,421
Shindo.tests('AWS::ECS | cluster requests', ['aws', 'ecs']) do Fog::AWS[:ecs].reset_data tests('success') do tests("#create_cluster").formats(AWS::ECS::Formats::CREATE_CLUSTER) do result = Fog::AWS[:ecs].create_cluster('clusterName' => 'cluster1').body cluster = result['CreateClusterResult']['clu...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/cloud_formation/stack_tests.rb
Ruby
mit
304
master
4,875
Shindo.tests('AWS::CloudFormation | stack requests', ['aws', 'cloudformation']) do @validate_template_format = { 'Description' => String, 'Parameters' => [ { 'DefaultValue' => Fog::Nullable::String, 'Description' => String, 'NoEcho' => Fog::Boolean, 'Parameter...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/lambda/helper.rb
Ruby
mit
304
master
2,591
class AWS class Lambda module Formats require 'zip' GET_FUNCTION_CONFIGURATION = { 'CodeSize' => Integer, 'Description' => Fog::Nullable::String, 'FunctionArn' => String, 'FunctionName' => String, 'Handler' => String, 'LastModified' => Time, ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/lambda/function_tests.rb
Ruby
mit
304
master
18,516
Shindo.tests('AWS::Lambda | function requests', ['aws', 'lambda']) do _lambda = Fog::AWS[:lambda] account_id = _lambda.account_id region = _lambda.region function1 = IO.read(AWS::Lambda::Samples::FUNCTION_1) function2 = IO.read(AWS::Lambda::Samples::FUNCTION_2) zipped_function1 = Base64::encode64(A...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/data_pipeline/helper.rb
Ruby
mit
304
master
1,776
class AWS module DataPipeline module Formats BASIC = { 'pipelineId' => String, } FIELDS = [ { "key" => String, "refValue" => Fog::Nullable::String, "stringValue" => Fog::Nullable::String, } ] LIST_PIPELINES = { "hasMoreR...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/data_pipeline/pipeline_tests.rb
Ruby
mit
304
master
2,789
Shindo.tests('AWS::DataPipeline | pipeline_tests', ['aws', 'data_pipeline']) do @pipeline_id = nil tests('success') do tests("#create_pipeline").formats(AWS::DataPipeline::Formats::BASIC) do unique_id = 'fog-test-pipeline-unique-id' name = 'fog-test-pipeline-name' description = 'Fog test pipe...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/elbv2/load_balancer_tests.rb
Ruby
mit
304
master
2,191
Shindo.tests('AWS::ELBV2 | load_balancer_tests', ['aws', 'elb']) do @load_balancer_id = 'fog-test-elb' @key_name = 'fog-test' vpc = Fog::Compute[:aws].create_vpc('10.255.254.64/28').body['vpcSet'].first @subnet_id = Fog::Compute[:aws].create_subnet(vpc['vpcId'], vpc['cidrBlock']).body['subnet']['subnetId'] @t...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/elbv2/helper.rb
Ruby
mit
304
master
1,931
class AWS module ELBV2 module Formats BASIC = { 'ResponseMetadata' => {'RequestId' => String} } LOAD_BALANCER = { "AvailabilityZones" => [{ "SubnetId" => String, "ZoneName" => String, "LoadBalancerAddresses" => [Fog::Nullable::Hash] }], "LoadB...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/describe_events.rb
Ruby
mit
304
master
352
Shindo.tests('AWS::RDS | describe DB events requests',['aws', 'rds']) do tests('success') do pending if Fog.mocking? tests( '#describe_events' ).formats(AWS::RDS::Formats::EVENT_LIST) do Fog::AWS[:rds].describe_events().body['Events'] end end tests('failure') do #TODO: What consti...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/instance_option_tests.rb
Ruby
mit
304
master
1,173
Shindo.tests('AWS::RDS | db instance option requests', ['aws', 'rds']) do tests('success') do tests("#describe_orderable_db_instance_options('mysql)").formats(AWS::RDS::Formats::DESCRIBE_ORDERABLE_DB_INSTANCE_OPTION) do body = Fog::AWS[:rds].describe_orderable_db_instance_options('mysql').body retu...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/security_group_tests.rb
Ruby
mit
304
master
4,787
Shindo.tests('AWS::RDS | security group requests', ['aws', 'rds']) do suffix = rand(65536).to_s(16) @sec_group_name = "fog-sec-group-#{suffix}" if Fog.mocking? @owner_id = '123456780' else @owner_id = Fog::AWS[:rds].security_groups.get('default').owner_id end tests('success') do tests("#crea...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/instance_tests.rb
Ruby
mit
304
master
6,419
Shindo.tests('AWS::RDS | instance requests', ['aws', 'rds']) do # random_differentiator # Useful when rapidly re-running tests, so we don't have to wait # several minutes for deleted servers to disappear suffix = rand(65536).to_s(16) @db_instance_id = "fog-test-#{suffix}" @db_replica_id =...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/tagging_tests.rb
Ruby
mit
304
master
2,668
Shindo.tests('AWS::RDS | tagging requests', ['aws', 'rds']) do @rds = Fog::AWS[:rds] @db_instance_id = "fog-test-#{rand(65536).to_s(16)}" Fog::Formatador.display_line "Creating RDS instance #{@db_instance_id}" @rds.create_db_instance(@db_instance_id, 'AllocatedStorage' => 5, 'DBInstanceClass' => 'db.t1....
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/helper.rb
Ruby
mit
304
master
12,847
class AWS module RDS module Formats BASIC = { 'ResponseMetadata' => { 'RequestId' => String } } DB_AVAILABILITY_ZONE_OPTION = { 'Name' => String } DB_PARAMETER_GROUP = { 'DBParameterGroupFamily' => String, 'DBParameterGroupName' => String, 'D...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/db_engine_versions.rb
Ruby
mit
304
master
265
Shindo.tests('AWS::RDS | describe db engine versions', ['aws', 'rds']) do tests('success') do tests("#describe_db_engine_versions").formats(AWS::RDS::Formats::DB_ENGINE_VERSIONS_LIST) do Fog::AWS[:rds].describe_db_engine_versions.body end end end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/subnet_groups_tests.rb
Ruby
mit
304
master
1,910
Shindo.tests('AWS::RDS | subnet group requests', ['aws', 'rds']) do # random_differentiator # Useful when rapidly re-running tests, so we don't have to wait # several minutes for deleted VPCs/subnets to disappear suffix = rand(65536).to_s(16) @subnet_group_name = "fog-test-#{suffix}" vpc_range = rand(245) ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/db_snapshot_tests.rb
Ruby
mit
304
master
2,050
Shindo.tests('Fog::Rds[:aws] | db snapshot requests', ['aws']) do @snapshot_format = { 'AllocatedStorage' => Integer, 'AvailabilityZone' => Fog::Nullable::String, 'Engine' => String, 'EngineVersion' => String, 'InstanceCreateTime' => Time, 'DBInstanceIdentifier'...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/log_file_tests.rb
Ruby
mit
304
master
587
Shindo.tests('AWS::RDS | log file requests', %w[aws rds]) do tests('success') do pending if Fog.mocking? suffix = rand(65536).to_s(16) @db_instance_id = "fog-test-#{suffix}" tests('#describe_db_log_files').formats(AWS::RDS::Formats::DESCRIBE_DB_LOG_FILES) do result = Fog::AWS[:rds].describe_db...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/parameter_request_tests.rb
Ruby
mit
304
master
1,254
Shindo.tests('AWS::RDS | parameter requests', ['aws', 'rds']) do tests('success') do Fog::AWS[:rds].create_db_parameter_group('fog-group', 'MySQL5.1', 'Some description') tests('#modify_db_parameter_group').formats(AWS::RDS::Formats::MODIFY_PARAMETER_GROUP) do body = Fog::AWS[:rds].modify_db_parameter_...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/event_subscription_tests.rb
Ruby
mit
304
master
1,425
Shindo.tests('AWS::RDS | event subscription requests', ['aws', 'rds']) do pending unless Fog.mocking? @name = 'fog' @arn = 'arn:aws:sns:us-east-1:12345678910:fog' tests('success') do tests('#create_event_subscription').formats(AWS::RDS::Formats::CREATE_EVENT_SUBSCRIPTION) do body = Fog::AWS[:rds].c...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/cluster_tests.rb
Ruby
mit
304
master
1,547
Shindo.tests('AWS::RDS | cluster requests', ['aws', 'rds']) do suffix = rand(65535).to_s(16) @cluster_id = "fog-test-#{suffix}" @master_id = "fog-master-#{suffix}" @final_snapshot_id = "fog-snapshot-#{suffix}" tests("success") do tests("#create_db_cluster").formats(AWS::RDS::Formats::CREA...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/parameter_group_tests.rb
Ruby
mit
304
master
2,496
Shindo.tests('AWS::RDS | parameter group requests', ['aws', 'rds']) do tests('success') do tests("#create_db_parameter_groups").formats(AWS::RDS::Formats::CREATE_DB_PARAMETER_GROUP) do body = Fog::AWS[:rds].create_db_parameter_group('fog-group', 'MySQL5.1', 'Some description').body returns( 'mysql5....
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/rds/cluster_snapshot_tests.rb
Ruby
mit
304
master
2,314
Shindo.tests('AWS::RDS | cluster snapshot requests', ['aws', 'rds']) do @cluster_id = uniq_id("fog-test") @snapshot_id = uniq_id("cluster-db-snapshot") @cluster = Fog::AWS[:rds].clusters.create(rds_default_cluster_params.merge(:id => @cluster_id)) @snapshot_count = Fog::AWS[:rds].describe_db_clust...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/sts/session_token_tests.rb
Ruby
mit
304
master
349
Shindo.tests('AWS::STS | session tokens', ['aws']) do @session_format = { 'SessionToken' => String, 'SecretAccessKey' => String, 'Expiration' => String, 'AccessKeyId' => String, 'RequestId' => String } tests("#get_session_token").formats(@session_format) do pending if Fog.mocking? Fog::AWS[:sts].get_...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/sts/assume_role_tests.rb
Ruby
mit
304
master
604
Shindo.tests('AWS::STS | assume role', ['aws']) do @policy = {"Statement" => [{"Effect" => "Allow", "Action" => "*", "Resource" => "*"}]} @response_format = { 'SessionToken' => String, 'SecretAccessKey' => String, 'Expiration' => String, 'AccessKeyId' => String, 'Arn' => String, 'RequestId...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/sts/assume_role_with_saml_tests.rb
Ruby
mit
304
master
655
Shindo.tests('AWS::STS | assume role with SAML', ['aws']) do @policy = {"Statement" => [{"Effect" => "Allow", "Action" => "*", "Resource" => "*"}]} @response_format = { 'SessionToken' => String, 'SecretAccessKey' => String, 'Expiration' => String, 'AccessKeyId' => String, 'Arn' ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/sts/get_federation_token_tests.rb
Ruby
mit
304
master
565
Shindo.tests('AWS::STS | session tokens', ['aws']) do @policy = {"Statement" => [{"Effect" => "Allow", "Action" => "*", "Resource" => "*"}]} @federation_format = { 'SessionToken' => String, 'SecretAccessKey' => String, 'Expiration' => String, 'AccessKeyId' => String, 'Arn' => String, 'FederatedUserId' =...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/sts/assume_role_with_web_identity_tests.rb
Ruby
mit
304
master
901
Shindo.tests('AWS::STS | assume role with web identity', ['aws']) do @sts = Fog::AWS[:sts] @iam = Fog::AWS[:iam] @role = @iam.create_role('sts', Fog::AWS::IAM::EC2_ASSUME_ROLE_POLICY).body['Role'] @token = Fog::AWS::Mock.key_id @response_format = { 'AssumedRoleUser' => { 'Arn' =>...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/federation/get_signin_token_tests.rb
Ruby
mit
304
master
283
Shindo.tests('AWS::Federation | signin tokens', ['aws']) do @signin_token_format = { 'SigninToken' => String } tests("#get_signin_token").formats(@signin_token_format) do pending unless Fog.mocking? Fog::AWS[:federation].get_signin_token("test_policy") end end
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/beanstalk/application_tests.rb
Ruby
mit
304
master
4,199
Shindo.tests('AWS::ElasticBeanstalk | application_tests', ['aws', 'beanstalk']) do def unique_name(prefix) #get time (with 1/100th of sec accuracy) #want unique domain name and if provider is fast, this can be called more than once per second time = Time.now.to_i.to_s prefix + time end unless Fo...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/beanstalk/solution_stack_tests.rb
Ruby
mit
304
master
655
Shindo.tests('AWS::ElasticBeanstalk | solution_stack_tests', ['aws', 'beanstalk']) do tests('success') do pending if Fog.mocking? @solution_stack_result_format = { 'ListAvailableSolutionStacksResult' => { 'SolutionStackDetails' => [ 'SolutionStackName' => String, ...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/dns/change_resource_record_sets_tests.rb
Ruby
mit
304
master
1,125
Shindo.tests('Fog::DNS[:aws] | change_resource_record_sets', ['aws', 'dns']) do tests('success') do test('#elb_hosted_zone_mapping from DNS name') do zone_id = Fog::AWS::DNS.hosted_zone_for_alias_target('arbitrary-sub-domain.eu-west-1.elb.amazonaws.com') zone_id == Fog::AWS::DNS.elb_hosted_zone_mappin...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/dns/health_check_tests.rb
Ruby
mit
304
master
6,009
Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do pending if Fog.mocking? @r53_connection = Fog::DNS[:aws] tests('success') do tests('create a health check') do after do @r53_connection.delete_health_check(@response.body['HealthCheck']['Id']) end test('create an I...
github
fog/fog-aws
https://github.com/fog/fog-aws
tests/requests/dns/helper.rb
Ruby
mit
304
master
541
class AWS module DNS module Formats RESOURCE_RECORD_SET = { "ResourceRecords" => Array, "Name" => String, "Type" => String, "AliasTarget"=> Fog::Nullable::Hash, "TTL" => Fog::Nullable::String } LIST_RESOURCE_RECORD_SETS = { "ResourceRecordSets" =>...