From c644a35d3cf6164411c171a718a57f0b3a4cbd77 Mon Sep 17 00:00:00 2001 From: Colin Johnson Date: Sun, 17 Feb 2013 23:31:59 +0000 Subject: [PATCH] update of ec2-automate-backup test script and ensure user_tag functionality uses correct variable for date created. --- .../QA/ec2-automate-backup/ec2-automate-backup-Test-Plan.txt | 4 ++++ ec2-automate-backup/ec2-automate-backup.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/aws-missing-tools-resources/QA/ec2-automate-backup/ec2-automate-backup-Test-Plan.txt b/aws-missing-tools-resources/QA/ec2-automate-backup/ec2-automate-backup-Test-Plan.txt index e465048..1119890 100644 --- a/aws-missing-tools-resources/QA/ec2-automate-backup/ec2-automate-backup-Test-Plan.txt +++ b/aws-missing-tools-resources/QA/ec2-automate-backup/ec2-automate-backup-Test-Plan.txt @@ -19,6 +19,10 @@ $ec2ab_exec -v "$volume_1_id $volume_2_id" $ec2ab_exec -v "$volume_1_id $volume_2_id" -n #expected result - snapshot only taken of volume_1 and volume_2 each with tag "name" set to ec2ab_$volume_id_$date_current # +#test backing up only EBS volume with IDs "x" and "y" and tagging them with "user tags" +$ec2ab_exec -v "$volume_1_id $volume_2_id" -u +#expected result - snapshot only taken of volume_1 and volume_2 each with tag "user tags" set to Volume=$ebs_selected and Created=$current_date +# #test backing up only EBS volume with IDs "x" and "y" and tagging them with a tag "PurgeAfter=14" $ec2ab_exec -v "$volume_1_id $volume_2_id" -k 14 #expected result - snapshot only taken of volume_1 and volume_2 each with tags "PurgeAfter=$date_current+14" and "PurgeAllow=true" diff --git a/ec2-automate-backup/ec2-automate-backup.sh b/ec2-automate-backup/ec2-automate-backup.sh index 2951387..6c61276 100755 --- a/ec2-automate-backup/ec2-automate-backup.sh +++ b/ec2-automate-backup/ec2-automate-backup.sh @@ -65,7 +65,7 @@ create_EBS_Snapshot_Tags() #if $user_tags is true, then append Volume=$ebs_selected and Created=$current_date to the variable $snapshot_tags if $user_tags then - snapshot_tags="$snapshot_tags --tag Volume=${ebs_selected} --tag Created=$current_date" + snapshot_tags="$snapshot_tags --tag Volume=${ebs_selected} --tag Created=$date_current" fi #if $snapshot_tags is not zero length then set the tag on the snapshot using ec2-create-tags