#==============================================================================#
# EC2/test/runtests.jl
#
# Copyright Sam O'Connor 2014 - All rights reserved
#==============================================================================#


using AWSEC2
using Base.Test

AWSCore.set_debug_level(1)


#-------------------------------------------------------------------------------
# Load credentials...
#-------------------------------------------------------------------------------

aws = AWSCore.aws_config()



#-------------------------------------------------------------------------------
# EC2 tests
#-------------------------------------------------------------------------------

@test_throws AWSCore.AWSException ec2_id(aws, "Not a real server name!!")


r = ec2(aws, Dict("Action"           => "DescribeImages",
                  "Filter.1.Name"    => "image-id",
                  "Filter.1.Value.1" => "ami-1ecae776"))

@test r["imagesSet"]["item"]["description"] == 
      "Amazon Linux AMI 2015.03.0 x86_64 HVM GP2"



#==============================================================================#
# End of file.
#==============================================================================#
