Sha256: 5d6c4ecab64b06d62e238df42e9d269029d24be5c077f70ac09564eaf51d6401
Contents?: true
Size: 1.49 KB
Versions: 4
Compression:
Stored size: 1.49 KB
Contents
group "Routines" library :rudy, 'lib' tryout "Keypair Handler" do set :user, Rudy::Utils.strand(4) set :keydir, '/tmp' set :global, Rudy::Huxtable.global set :config, Rudy::Huxtable.config set :test_env, 'env_' << Rudy::Utils.strand setup do Rudy.enable_debug Rudy::Huxtable.update_config # Read config files akey, skey, region = global.accesskey, global.secretkey, global.region Rudy::Metadata.connect akey, skey, region Rudy::AWS::EC2.connect akey, skey, region global.environment = test_env config.defaults[:keydir] = keydir end drill "has new temporary ssh key directory", keydir do config.defaults[:keydir] end drill "knows when a keypair isn't registered", false do Rudy::Routines::Handlers::Keypair.registered? user end drill "knows when a private key file doesn't exist", false do Rudy::Routines::Handlers::Keypair.pkey? '/path/2/' << user end dream "#{keydir}/key-us-east-1b-#{test_env}-app-#{user}" drill "determine keypair path (#{user})" do Rudy::Routines::Handlers::Keypair.pkey user end dream "#{keydir}/key-us-east-1b-#{test_env}-app" drill "determine root keypair path" do Rudy::Routines::Handlers::Keypair.pkey :root end dream :class, Rudy::AWS::EC2::Keypair drill "create a new keypair" do Rudy::Routines::Handlers::Keypair.create user end dream :class, Rudy::AWS::EC2::Keypair drill "create a new root keypair" do Rudy::Routines::Handlers::Keypair.create :root end end
Version data entries
4 entries across 4 versions & 2 rubygems