initial commit from code.google.com
This commit is contained in:
39
aws-missing-tools-resources/Maps/aws-ec2-ami-map.txt
Normal file
39
aws-missing-tools-resources/Maps/aws-ec2-ami-map.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
#Region
|
||||
#Format: region,region,...
|
||||
us-east-1,us-west-2,us-west-1,eu-west-1,ap-southeast-1,ap-northeast-1,sa-east-1
|
||||
#Format: Region,bitdepth,storage,amiid
|
||||
#us-east-1
|
||||
us-east-1,32,EBS,ami-ed65ba84
|
||||
us-east-1,64,EBS,ami-e565ba8c
|
||||
us-east-1,32,S3,ami-db65bab2
|
||||
us-east-1,64,S3,ami-f565ba9c
|
||||
#us-west-2
|
||||
us-west-2,32,EBS,ami-38c64a08
|
||||
us-west-2,64,EBS,ami-3ac64a0a
|
||||
us-west-2,32,S3,ami-36c64a06
|
||||
us-west-2,64,S3,ami-30c64a00
|
||||
#us-west-1
|
||||
us-west-1,32,EBS,ami-978cd4d2
|
||||
us-west-1,64,EBS,ami-e78cd4a2
|
||||
us-west-1,32,S3,ami-e58cd4a0
|
||||
us-west-1,64,S3,ami-d98cd49c
|
||||
#eu-west-1
|
||||
eu-west-1,32,EBS,ami-fd231b89
|
||||
eu-west-1,64,EBS,ami-f9231b8d
|
||||
eu-west-1,32,S3,ami-fb231b8f
|
||||
eu-west-1,64,S3,ami-ff231b8b
|
||||
#ap-southeast-1
|
||||
ap-southeast-1,32,EBS,ami-b83374ea
|
||||
ap-southeast-1,64,EBS,ami-be3374ec
|
||||
ap-southeast-1,32,S3,ami-b43374e6
|
||||
ap-southeast-1,64,S3,ami-b23374e0
|
||||
#ap-northeast-1
|
||||
ap-northeast-1,32,EBS,ami-087acb09
|
||||
ap-northeast-1,64,EBS,ami-e47acbe5
|
||||
ap-northeast-1,32,S3,ami-087bca09
|
||||
ap-northeast-1,64,S3,ami-047bca05
|
||||
#sa-east-1
|
||||
sa-east-1,32,EBS,ami-aa855bb7
|
||||
sa-east-1,64,EBS,ami-a6855bbb
|
||||
sa-east-1,32,S3,ami-a8855bb5
|
||||
sa-east-1,64,S3,ami-ae855bb3
|
||||
200
aws-missing-tools-resources/Maps/aws-ec2-cost-map.txt
Normal file
200
aws-missing-tools-resources/Maps/aws-ec2-cost-map.txt
Normal file
@@ -0,0 +1,200 @@
|
||||
#Region
|
||||
#Format: region,region,...
|
||||
us-east-1,us-west-2,us-west-1,eu-west-1,ap-southeast-1,ap-northeast-1,sa-east-1
|
||||
#Format: Region,InstanceType,OS,Cost
|
||||
#us-east-1, linux
|
||||
us-east-1,t1.micro,linux,0.02
|
||||
us-east-1,m1.small,linux,0.085
|
||||
us-east-1,m1.medium,linux,0.16
|
||||
us-east-1,c1.medium,linux,0.17
|
||||
us-east-1,m1.large,linux,0.34
|
||||
us-east-1,m2.xlarge,linux,0.50
|
||||
us-east-1,m1.xlarge,linux,0.68
|
||||
us-east-1,c1.xlarge,linux,0.68
|
||||
us-east-1,m2.2xlarge,linux,1.00
|
||||
us-east-1,m2.4xlarge,linux,2.00
|
||||
us-east-1,cc1.4xlarge,linux,1.30
|
||||
us-east-1,cc2.8xlarge,linux,2.40
|
||||
us-east-1,cg1.4xlarge,linux,2.10
|
||||
#us-east-1, windows
|
||||
us-east-1,t1.micro,windows,0.03
|
||||
us-east-1,m1.small,windows,0.12
|
||||
us-east-1,m1.medium,windows,0.23
|
||||
us-east-1,c1.medium,windows,0.29
|
||||
us-east-1,m1.large,windows,0.48
|
||||
us-east-1,m2.xlarge,windows,0.62
|
||||
us-east-1,m1.xlarge,windows,0.96
|
||||
us-east-1,c1.xlarge,windows,1.16
|
||||
us-east-1,m2.2xlarge,windows,1.24
|
||||
us-east-1,m2.4xlarge,windows,2.48
|
||||
us-east-1,cc1.4xlarge,windows,1.61
|
||||
us-east-1,cc2.8xlarge,windows,2.97
|
||||
us-east-1,cg1.4xlarge,windows,2.60
|
||||
#us-west-2, linux
|
||||
us-west-2,t1.micro,linux,0.02
|
||||
us-west-2,m1.small,linux,0.085
|
||||
us-west-2,m1.medium,linux,0.16
|
||||
us-west-2,c1.medium,linux,0.17
|
||||
us-west-2,m1.large,linux,0.34
|
||||
us-west-2,m2.xlarge,linux,0.50
|
||||
us-west-2,m1.xlarge,linux,0.68
|
||||
us-west-2,c1.xlarge,linux,0.68
|
||||
us-west-2,m2.2xlarge,linux,1.00
|
||||
us-west-2,m2.4xlarge,linux,2.00
|
||||
us-west-2,cc1.4xlarge,linux,NA
|
||||
us-west-2,cc2.8xlarge,linux,NA
|
||||
us-west-2,cg1.4xlarge,linux,NA
|
||||
#us-west-2, windows
|
||||
us-west-2,t1.micro,windows,0.03
|
||||
us-west-2,m1.small,windows,0.12
|
||||
us-west-2,m1.medium,windows,0.23
|
||||
us-west-2,c1.medium,windows,0.29
|
||||
us-west-2,m1.large,windows,0.48
|
||||
us-west-2,m2.xlarge,windows,0.62
|
||||
us-west-2,m1.xlarge,windows,0.96
|
||||
us-west-2,c1.xlarge,windows,1.16
|
||||
us-west-2,m2.2xlarge,windows,1.24
|
||||
us-west-2,m2.4xlarge,windows,2.48
|
||||
us-west-2,cc1.4xlarge,windows,NA
|
||||
us-west-2,cc2.8xlarge,windows,NA
|
||||
us-west-2,cg1.4xlarge,windows,NA
|
||||
#us-west-1, linux
|
||||
us-west-1,t1.micro,linux,0.025
|
||||
us-west-1,m1.small,linux,0.095
|
||||
us-west-1,m1.medium,linux,0.18
|
||||
us-west-1,c1.medium,linux,0.19
|
||||
us-west-1,m1.large,linux,0.38
|
||||
us-west-1,m2.xlarge,linux,0.57
|
||||
us-west-1,m1.xlarge,linux,0.76
|
||||
us-west-1,c1.xlarge,linux,0.76
|
||||
us-west-1,m2.2xlarge,linux,1.14
|
||||
us-west-1,m2.4xlarge,linux,2.28
|
||||
us-west-1,cc1.4xlarge,linux,NA
|
||||
us-west-1,cc2.8xlarge,linux,NA
|
||||
us-west-1,cg1.4xlarge,linux,NA
|
||||
#us-west-1, windows
|
||||
us-west-1,t1.micro,windows,0.035
|
||||
us-west-1,m1.small,windows,0.13
|
||||
us-west-1,m1.medium,windows,0.25
|
||||
us-west-1,c1.medium,windows,0.31
|
||||
us-west-1,m1.large,windows,0.52
|
||||
us-west-1,m2.xlarge,windows,0.69
|
||||
us-west-1,m1.xlarge,windows,1.04
|
||||
us-west-1,c1.xlarge,windows,1.24
|
||||
us-west-1,m2.2xlarge,windows,1.38
|
||||
us-west-1,m2.4xlarge,windows,2.76
|
||||
us-west-1,cc1.4xlarge,windows,NA
|
||||
us-west-1,cc2.8xlarge,windows,NA
|
||||
us-west-1,cg1.4xlarge,windows,NA
|
||||
#eu-west-1, linux
|
||||
eu-west-1,t1.micro,linux,0.025
|
||||
eu-west-1,m1.small,linux,0.09
|
||||
eu-west-1,m1.medium,linux,0.18
|
||||
eu-west-1,c1.medium,linux,0.186
|
||||
eu-west-1,m1.large,linux,0.38
|
||||
eu-west-1,m2.xlarge,linux,0.506
|
||||
eu-west-1,m1.xlarge,linux,0.72
|
||||
eu-west-1,c1.xlarge,linux,0.744
|
||||
eu-west-1,m2.2xlarge,linux,1.012
|
||||
eu-west-1,m2.4xlarge,linux,2.024
|
||||
eu-west-1,cc1.4xlarge,linux,NA
|
||||
eu-west-1,cc2.8xlarge,linux,NA
|
||||
eu-west-1,cg1.4xlarge,linux,NA
|
||||
#eu-west-1, windows
|
||||
eu-west-1,t1.micro,windows,0.035
|
||||
eu-west-1,m1.small,windows,0.115
|
||||
eu-west-1,m1.medium,windows,0.285
|
||||
eu-west-1,c1.medium,windows,0.285
|
||||
eu-west-1,m1.large,windows,0.46
|
||||
eu-west-1,m2.xlarge,windows,0.57
|
||||
eu-west-1,m1.xlarge,windows,0.92
|
||||
eu-west-1,c1.xlarge,windows,1.14
|
||||
eu-west-1,m2.2xlarge,windows,1.14
|
||||
eu-west-1,m2.4xlarge,windows,2.28
|
||||
eu-west-1,cc1.4xlarge,windows,NA
|
||||
eu-west-1,cc2.8xlarge,windows,NA
|
||||
eu-west-1,cg1.4xlarge,windows,NA
|
||||
#ap-southeast-1, linux
|
||||
ap-southeast-1,t1.micro,linux,0.025
|
||||
ap-southeast-1,m1.small,linux,0.095
|
||||
ap-southeast-1,m1.medium,linux,0.18
|
||||
ap-southeast-1,c1.medium,linux,0.19
|
||||
ap-southeast-1,m1.large,linux,0.38
|
||||
ap-southeast-1,m2.xlarge,linux,0.57
|
||||
ap-southeast-1,m1.xlarge,linux,0.76
|
||||
ap-southeast-1,c1.xlarge,linux,0.76
|
||||
ap-southeast-1,m2.2xlarge,linux,1.14
|
||||
ap-southeast-1,m2.4xlarge,linux,2.28
|
||||
ap-southeast-1,cc1.4xlarge,linux,NA
|
||||
ap-southeast-1,cc2.8xlarge,linux,NA
|
||||
ap-southeast-1,cg1.4xlarge,linux,NA
|
||||
#ap-southeast-1, windows
|
||||
ap-southeast-1,t1.micro,windows,0.035
|
||||
ap-southeast-1,m1.small,windows,0.12
|
||||
ap-southeast-1,m1.medium,windows,0.23
|
||||
ap-southeast-1,c1.medium,windows,0.29
|
||||
ap-southeast-1,m1.large,windows,0.48
|
||||
ap-southeast-1,m2.xlarge,windows,0.62
|
||||
ap-southeast-1,m1.xlarge,windows,0.96
|
||||
ap-southeast-1,c1.xlarge,windows,1.16
|
||||
ap-southeast-1,m2.2xlarge,windows,1.24
|
||||
ap-southeast-1,m2.4xlarge,windows,2.48
|
||||
ap-southeast-1,cc1.4xlarge,windows,NA
|
||||
ap-southeast-1,cc2.8xlarge,windows,NA
|
||||
ap-southeast-1,cg1.4xlarge,windows,NA
|
||||
#ap-northeast-1, linux
|
||||
ap-northeast-1,t1.micro,linux,0.027
|
||||
ap-northeast-1,m1.small,linux,0.10
|
||||
ap-northeast-1,m1.medium,linux,0.184
|
||||
ap-northeast-1,c1.medium,linux,0.20
|
||||
ap-northeast-1,m1.large,linux,0.40
|
||||
ap-northeast-1,m2.xlarge,linux,0.60
|
||||
ap-northeast-1,m1.xlarge,linux,0.80
|
||||
ap-northeast-1,c1.xlarge,linux,0.80
|
||||
ap-northeast-1,m2.2xlarge,linux,1.20
|
||||
ap-northeast-1,m2.4xlarge,linux,2.39
|
||||
ap-northeast-1,cc1.4xlarge,linux,NA
|
||||
ap-northeast-1,cc2.8xlarge,linux,NA
|
||||
ap-northeast-1,cg1.4xlarge,linux,NA
|
||||
#ap-northeast-1, windows
|
||||
ap-northeast-1,t1.micro,windows,0.035
|
||||
ap-northeast-1,m1.small,windows,0.12
|
||||
ap-northeast-1,m1.medium,windows,0.23
|
||||
ap-northeast-1,c1.medium,windows,0.29
|
||||
ap-northeast-1,m1.large,windows,0.48
|
||||
ap-northeast-1,m2.xlarge,windows,0.62
|
||||
ap-northeast-1,m1.xlarge,windows,0.96
|
||||
ap-northeast-1,c1.xlarge,windows,1.16
|
||||
ap-northeast-1,m2.2xlarge,windows,1.24
|
||||
ap-northeast-1,m2.4xlarge,windows,2.48
|
||||
ap-northeast-1,cc1.4xlarge,windows,NA
|
||||
ap-northeast-1,cc2.8xlarge,windows,NA
|
||||
ap-northeast-1,cg1.4xlarge,windows,NA
|
||||
#sa-east-1, linux
|
||||
sa-east-1,t1.micro,linux,0.027
|
||||
sa-east-1,m1.small,linux,0.115
|
||||
sa-east-1,m1.medium,linux,0.23
|
||||
sa-east-1,c1.medium,linux,0.23
|
||||
sa-east-1,m1.large,linux,0.46
|
||||
sa-east-1,m2.xlarge,linux,0.68
|
||||
sa-east-1,m1.xlarge,linux,0.92
|
||||
sa-east-1,c1.xlarge,linux,0.92
|
||||
sa-east-1,m2.2xlarge,linux,1.36
|
||||
sa-east-1,m2.4xlarge,linux,2.72
|
||||
sa-east-1,cc1.4xlarge,linux,NA
|
||||
sa-east-1,cc2.8xlarge,linux,NA
|
||||
sa-east-1,cg1.4xlarge,linux,NA
|
||||
#sa-east-1, windows
|
||||
sa-east-1,t1.micro,windows,0.037
|
||||
sa-east-1,m1.small,windows,0.15
|
||||
sa-east-1,m1.small,windows,0.30
|
||||
sa-east-1,c1.medium,windows,0.35
|
||||
sa-east-1,m1.large,windows,0.60
|
||||
sa-east-1,m2.xlarge,windows,0.80
|
||||
sa-east-1,m1.xlarge,windows,1.20
|
||||
sa-east-1,c1.xlarge,windows,1.40
|
||||
sa-east-1,m2.2xlarge,windows,1.60
|
||||
sa-east-1,m2.4xlarge,windows,3.20
|
||||
sa-east-1,cc1.4xlarge,windows,NA
|
||||
sa-east-1,cc2.8xlarge,windows,NA
|
||||
sa-east-1,cg1.4xlarge,windows,NA
|
||||
@@ -0,0 +1,47 @@
|
||||
Format:
|
||||
Test Procedure Name:
|
||||
Last Tested Date: <Date, in format YYYY-MM-DD>
|
||||
Last Tested Version: <Version Number>
|
||||
Result: <Pass/Fail>
|
||||
|
||||
1.1 ASG Selection:
|
||||
Last Tested Date: 2011-11-14
|
||||
Last Tested Version: 0.1
|
||||
Result: Pass
|
||||
Test with ASG set correctly. Applies alarms to selected RDS instance.
|
||||
Test with ASG set incorretly. Fails.
|
||||
Test with ASG set and ALLASG set. Fails.
|
||||
Test with ALLASG set. Applies alarms to all ASG resources.
|
||||
|
||||
1.2 Evaluation Period
|
||||
Last Tested Date: 2011-11-14
|
||||
Last Tested Version: 0.1
|
||||
Result: Pass
|
||||
Test with Evaluation Period not set.
|
||||
Test with Evaluation Period set to 1.
|
||||
Test with Evaluation Period set to 100.
|
||||
|
||||
1.3 SNS Topic Validator (Not implemented as of version 0.1)
|
||||
Last Tested Date: <Date>
|
||||
Last Tested Version: <Version Number>
|
||||
Result: <Pass/Fail>
|
||||
Test with SNS topic not set.
|
||||
Test with SNS topic set correctly.
|
||||
Test with SNS topic set incorrectly.
|
||||
|
||||
1.4 Preview Mode Validtor
|
||||
Last Tested Date: 2011-11-14
|
||||
Last Tested Version: 0.1
|
||||
Result: Pass
|
||||
Test with Previewmode not set. Result: alarms applied.
|
||||
Test with Previewmode set incorrectly. Result: exit.
|
||||
Test with Previewmode set to "True|true". Result: alarms applied.
|
||||
|
||||
1.5 ASG Availability (Not implemented as of version 0.1)
|
||||
Last Tested Date: <Date>
|
||||
Last Tested Version: <Version Number>
|
||||
Result: <Pass/Fail>
|
||||
Test -g with no asg resources available.
|
||||
Test -g with asg resources available.
|
||||
Test -a with no asg resources available.
|
||||
Test -a with asg resources available.
|
||||
85
aws-missing-tools-resources/QA/as-apply-alarms/as-apply-alarms-Tests.sh
Executable file
85
aws-missing-tools-resources/QA/as-apply-alarms/as-apply-alarms-Tests.sh
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/bin/bash
|
||||
#sets path = to /dev/null
|
||||
AWS_MISSING_TOOLS_PATH="/Temp/aws-missing-tools/as-apply-alarms/"
|
||||
echo
|
||||
echo " -Test: Prerequisite Checking"
|
||||
echo " -Test: Prerequisite Fail"
|
||||
PATH_BAK=$PATH #backup of current path
|
||||
export PATH=/dev/null
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Prerequisite Success"
|
||||
PATH=$PATH_BAK
|
||||
export PATH
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### Region Test
|
||||
echo
|
||||
echo " -Test: Region Testing"
|
||||
echo " -Test: Calling without region."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling without a region option."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -r -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid region option."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -r california
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid region option."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -r us-west-2
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### Evaluation Period Test
|
||||
echo
|
||||
echo " -Test: Evaluation Period Testing"
|
||||
echo " -Test: Calling without an Evaluation Period."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling without an Evaluation Period option."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -e
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid (low) Evaluation Period option."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -e 0
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid (high) Evaluation Period option."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -e 100
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid Evaluation Period option"
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -e 1
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### ASG Tests
|
||||
echo
|
||||
echo " -Test: Auto Scaling Group Testing"
|
||||
echo " -Test: Calling without Auto Scaling Group."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with no Auto Scaling Group defined."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -g
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid Auto Scaling Group."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -g california
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid Auto Scaling Group and all Auto Scaling Groups."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -g california -a
|
||||
echo "Exit Code: $?"
|
||||
as-create-launch-config amt-test-01 --image-id ami-31814f58 --instance-type t1.micro --key amt-test-01 --group amt-test-01
|
||||
as-create-auto-scaling-group amt-test-01 --min-size 0 --max-size 0 --desired-capacity 0 --launch-configuration amt-test-01 --availability-zones us-east-1a
|
||||
as-create-launch-config amt-test-02 --image-id ami-31814f58 --instance-type t1.micro --key amt-test-01 --group amt-test-01
|
||||
as-create-auto-scaling-group amt-test-02 --min-size 0 --max-size 0 --desired-capacity 0 --launch-configuration amt-test-02 --availability-zones us-east-1a
|
||||
echo " -Test: Calling with a valid Auto Scaling Group and all Auto Scaling Groups."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -g amt-test-01 -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid Auto Scaling Group."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -g amt-test-01
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with all Auto Scaling Groups."
|
||||
${AWS_MISSING_TOOLS_PATH}as-apply-alarms.sh -a
|
||||
echo "Exit Code: $?"
|
||||
|
||||
as-delete-auto-scaling-group amt-test-01 -f
|
||||
as-delete-launch-config amt-test-01 -f
|
||||
as-delete-auto-scaling-group amt-test-02 -f
|
||||
as-delete-launch-config amt-test-02 -f
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
#!/bin/bash
|
||||
#sets path = to /dev/null
|
||||
AWS_MISSING_TOOLS_PATH=/Temp/aws-missing-tools/as-update-launch-config/
|
||||
echo
|
||||
echo " -Test: Prerequisite Checking"
|
||||
echo " -Test: Prerequisite Fail"
|
||||
PATH_BAK=$PATH #backup of current path
|
||||
export PATH=/dev/null
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Prerequisite Success"
|
||||
PATH=$PATH_BAK
|
||||
export PATH
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh
|
||||
echo
|
||||
|
||||
##### Instance Type Test
|
||||
echo " -Test: Instance Type Testing"
|
||||
echo " -Test: Calling without an Instance Type"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling without an Instance Type"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling without an Invalid Instance Type"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i m1.micro
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a Valid Instance Type:"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i m1.small
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### User-Data Test
|
||||
echo
|
||||
echo " -Test: User-Data Testing"
|
||||
echo " -Test: Calling without user-data"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i m1.small
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling without user-data option"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i m1.small -u
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid user-data option"
|
||||
touch /Temp/touch.txt
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i m1.small -u /Temp/touch.txt
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### t1.micro test
|
||||
echo
|
||||
echo " -Test: t1.micro Bit Depth Testing"
|
||||
echo " -Test: Calling with a t1.micro instance type and no bit depth"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i t1.micro
|
||||
echo "Exit Code: $?"
|
||||
echo
|
||||
echo " -Test: t1.micro Bit Depth Testing"
|
||||
echo " -Test: Calling with a t1.micro instance type and an empty bit depth"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i t1.micro -b
|
||||
echo "Exit Code: $?"
|
||||
echo
|
||||
echo " -Test: t1.micro Bit Depth Testing"
|
||||
echo " -Test: Calling with a t1.micro instance type and 32 bit depth"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i t1.micro -b 32
|
||||
echo "Exit Code: $?"
|
||||
echo
|
||||
echo " -Test: t1.micro Bit Depth Testing"
|
||||
echo " -Test: Calling with a t1.micro instance type and 64 bit depth"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i t1.micro -b 64
|
||||
echo "Exit Code: $?"
|
||||
echo
|
||||
echo " -Test: t1.micro Bit Depth Testing"
|
||||
echo " -Test: Calling with a t1.micro instance type and 33 bit depth"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i t1.micro -b 33
|
||||
echo "Exit Code: $?"
|
||||
|
||||
|
||||
##### Auto Scaling Group Test
|
||||
echo
|
||||
echo " -Test: Auto Scaling Group Testing"
|
||||
echo " -Test: Calling without an Auto Scaling Group"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i m1.small -b 32 -u /Temp/touch.txt
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling without an Auto Scaling Group option."
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i m1.small -b 32 -u /Temp/touch.txt -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid Auto Scaling Group"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i m1.small -b 32 -u /Temp/touch.txt -a doesntexist
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid Auto Scaling Group"
|
||||
as-create-launch-config amt-test-01 --image-id ami-31814f58 --instance-type t1.micro --key amt-test-01 --group amt-test-01
|
||||
as-create-auto-scaling-group amt-test-01 --min-size 0 --max-size 0 --desired-capacity 0 --launch-configuration amt-test-01 --availability-zones us-east-1a
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i m1.small -b 32 -u /Temp/touch.txt -a amt-test-01
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid Auto Scaling Group and a Launch-Config amt-test-1 Already Created"
|
||||
${AWS_MISSING_TOOLS_PATH}as-update-launch-config.sh -i m1.small -b 32 -u /Temp/touch.txt -a amt-test-01
|
||||
echo "Exit Code: $?"
|
||||
as-delete-auto-scaling-group amt-test-01 -f
|
||||
as-delete-launch-config amt-test-01 -f
|
||||
85
aws-missing-tools-resources/QA/asg-apply-alarms/asg-apply-alarms-Tests.sh
Executable file
85
aws-missing-tools-resources/QA/asg-apply-alarms/asg-apply-alarms-Tests.sh
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/bin/bash
|
||||
#sets path = to /dev/null
|
||||
AWS_MISSING_TOOLS_PATH="/Temp/aws-missing-tools/asg-apply-alarms/"
|
||||
echo
|
||||
echo " -Test: Prerequisite Checking"
|
||||
echo " -Test: Prerequisite Fail"
|
||||
PATH_BAK=$PATH #backup of current path
|
||||
export PATH=/dev/null
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Prerequisite Success"
|
||||
PATH=$PATH_BAK
|
||||
export PATH
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### Region Test
|
||||
echo
|
||||
echo " -Test: Region Testing"
|
||||
echo " -Test: Calling without region."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling without a region option."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -r -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid region option."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -r california
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid region option."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -r us-west-2
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### Evaluation Period Test
|
||||
echo
|
||||
echo " -Test: Evaluation Period Testing"
|
||||
echo " -Test: Calling without an Evaluation Period."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling without an Evaludation Period option."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -e
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid (low) Evaluation Period option."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -e 0
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid (high) Evaluation Period option."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -e 100
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid Evaluation Period option"
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -e 1
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### ASG Tests
|
||||
echo
|
||||
echo " -Test: Auto Scaling Group Testing"
|
||||
echo " -Test: Calling without an Auto Scaling Group."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with no Auto Scaling Group defined."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -g
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid Auto Scaling Group."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -g california
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid Auto Scaling Group and all Auto Scaling Groups."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -g california -a
|
||||
echo "Exit Code: $?"
|
||||
as-create-launch-config amt-test-01 --image-id ami-31814f58 --instance-type t1.micro --key amt-test-01 --group amt-test-01
|
||||
as-create-auto-scaling-group amt-test-01 --min-size 0 --max-size 0 --desired-capacity 0 --launch-configuration amt-test-01 --availability-zones us-east-1a
|
||||
as-create-launch-config amt-test-02 --image-id ami-31814f58 --instance-type t1.micro --key amt-test-01 --group amt-test-01
|
||||
as-create-auto-scaling-group amt-test-02 --min-size 0 --max-size 0 --desired-capacity 0 --launch-configuration amt-test-02 --availability-zones us-east-1a
|
||||
echo " -Test: Calling with a valid Auto Scaling Group and all Auto Scaling Groups."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -g amt-test-01 -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid Auto Scaling Group."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -g amt-test-01
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with all Auto Scaling Groups."
|
||||
${AWS_MISSING_TOOLS_PATH}asg-apply-alarms.sh -a
|
||||
echo "Exit Code: $?"
|
||||
|
||||
as-delete-auto-scaling-group amt-test-01 -f
|
||||
as-delete-launch-config amt-test-01 -f
|
||||
as-delete-auto-scaling-group amt-test-02 -f
|
||||
as-delete-launch-config amt-test-02 -f
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
#set EC2CC_RB_APPLICATION prior to running
|
||||
EC2CC_RB_APPLICATION=/Temp/aws-missing-tools/ec2-cost-calculate-rb/ec2-cost-calculate.rb
|
||||
echo
|
||||
echo " -Test: Credentials File Checking"
|
||||
echo " -Test: Condition - Prerequisite File Does Not Exist"
|
||||
AWS_CREDENTIAL_FILE_BAK=$AWS_CREDENTIAL_FILE #backup of credential location
|
||||
export AWS_CREDENTIAL_FILE=/var/tmp/nofile.txt
|
||||
$EC2CC_RB_APPLICATION
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test Condition: Prerequisite Success"
|
||||
export AWS_CREDENTIAL_FILE=$AWS_CREDENTIAL_FILE_BAK
|
||||
$EC2CC_RB_APPLICATION
|
||||
echo
|
||||
|
||||
##### Simple Run Test
|
||||
echo " -Test: Simple Execution"
|
||||
$EC2CC_RB_APPLICATION
|
||||
echo "Exit Code: $?"
|
||||
##### Invalid Options Provided
|
||||
$EC2CC_RB_APPLICATION --option
|
||||
echo "Exit Code: $?"
|
||||
##### Invalid Options Provided
|
||||
$EC2CC_RB_APPLICATION --option invalid
|
||||
echo "Exit Code: $?"
|
||||
echo
|
||||
echo " -Test: Status Checking - Status Running"
|
||||
$EC2CC_RB_APPLICATION --status running
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Status Checking - Status All"
|
||||
$EC2CC_RB_APPLICATION --status all
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Status Checking - Status Invalid"
|
||||
$EC2CC_RB_APPLICATION --status invalid
|
||||
echo "Exit Code: $?"
|
||||
echo
|
||||
echo " -Test: Region Checking - Region us-east-1"
|
||||
$EC2CC_RB_APPLICATION --region us-east-1
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Region Checking - Region all"
|
||||
$EC2CC_RB_APPLICATION --region all
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Region Checking - Region invalid"
|
||||
$EC2CC_RB_APPLICATION --region invalid
|
||||
echo "Exit Code: $?"
|
||||
echo
|
||||
echo " -Test: Output Checking - Output Screen"
|
||||
$EC2CC_RB_APPLICATION --output screen
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Output Checking - Output File"
|
||||
echo " -Test: Output Checking - Output File Exists"
|
||||
$EC2CC_RB_APPLICATION --output file
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Output Checking - Output File Doesn't Exist, Custom Location"
|
||||
$EC2CC_RB_APPLICATION --output file --file ~/ec2cc_ooutput.txt
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Output Checking - Output File Exists, Custom Location"
|
||||
$EC2CC_RB_APPLICATION --output file file ~/ec2cc_ooutput.txt
|
||||
echo "Exit Code: $?"
|
||||
echo
|
||||
echo " -Test: Period Checking - Period Day"
|
||||
$EC2CC_RB_APPLICATION --period day
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Period Checking - Period Invalid"
|
||||
$EC2CC_RB_APPLICATION --period invalid
|
||||
echo "Exit Code: $?"
|
||||
echo
|
||||
echo " -Test: Seperator Checking - Seperator ;"
|
||||
$EC2CC_RB_APPLICATION --seperator \;
|
||||
echo "Exit Code: $?"
|
||||
78
aws-missing-tools-resources/QA/rds-apply-alarms/rds-apply-alarms-Tests.sh
Executable file
78
aws-missing-tools-resources/QA/rds-apply-alarms/rds-apply-alarms-Tests.sh
Executable file
@@ -0,0 +1,78 @@
|
||||
#!/bin/bash
|
||||
#sets path = to /dev/null
|
||||
AWS_MISSING_TOOLS_PATH="/Temp/aws-missing-tools/rds-apply-alarms/"
|
||||
echo
|
||||
echo " -Test: Prerequisite Checking"
|
||||
echo " -Test: Prerequisite Fail"
|
||||
PATH_BAK=$PATH #backup of current path
|
||||
export PATH=/dev/null
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Prerequisite Success"
|
||||
PATH=$PATH_BAK
|
||||
export PATH
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### Region Test
|
||||
echo
|
||||
echo " -Test: Region Testing"
|
||||
echo " -Test: Calling without region."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling without a region option."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -r -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid region option."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -r california
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid region option."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -r us-west-2
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### Evaluation Period Test
|
||||
echo
|
||||
echo " -Test: Evaluation Period Testing"
|
||||
echo " -Test: Calling without an Evaluation Period."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling without an Evaludation Period option."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -e
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid (low) Evaluation Period option."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -e 0
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid (high) Evaluation Period option."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -e 100
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid Evaluation Period option"
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -e 1
|
||||
echo "Exit Code: $?"
|
||||
|
||||
##### RDS Instance Tests
|
||||
echo
|
||||
echo " -Test: RDS Instance Testing"
|
||||
echo " -Test: Calling without an RDS Instance."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with no RDS Instance option defined."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -d
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with an invalid RDS Instance Group."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -d california
|
||||
echo "Exit Code: $?"
|
||||
rds-create-db-instance amt-test-01 --allocated-storage 5 --db-instance-class db.m1.small --engine mysql --master-user-password mj21s77 --master-username amttest01
|
||||
sleep 300
|
||||
echo " -Test: Calling with an invalid RDS Instance and all RDS Instances."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -d california -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid RDS Instance and all RDS Instances."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -d amt-test-1 -a
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with a valid RDS Instance."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -d amt-test-01
|
||||
echo "Exit Code: $?"
|
||||
echo " -Test: Calling with all RDS Instances."
|
||||
${AWS_MISSING_TOOLS_PATH}rds-apply-alarms.sh -a
|
||||
echo "Exit Code: $?"
|
||||
rds-delete-db-instance amt-test-01 -f --skip-final-snapshot
|
||||
Reference in New Issue
Block a user