Skip to content

Commit

Permalink
Add Sanity Test To Darwin And Win (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethAmazon authored Jan 8, 2024
1 parent aa908e6 commit 1d5554c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions terraform/ec2/mac/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ resource "null_resource" "integration_test" {
"sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:${module.validator.instance_agent_config}",
"./validator --validator-config=${module.validator.instance_validator_config} --preparation-mode=false",
"cd ~/amazon-cloudwatch-agent-test",
"echo run sanity test && sudo go test ./test/sanity -p 1 -v",
"sudo go test ./test/run_as_user -p 1 -timeout 1h -computeType=EC2 -bucket=${var.s3_bucket} -cwaCommitSha=${var.cwa_github_sha} -instanceId=${aws_instance.cwagent.id} -v",
]
}
Expand Down
4 changes: 4 additions & 0 deletions terraform/ec2/win/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ resource "null_resource" "integration_test_run_validator" {
"powershell.exe -Command \"Start-Sleep -s 60\"",
"powershell.exe -Command \"Invoke-WebRequest -Uri http://localhost:9404 -UseBasicParsing\"",
"set AWS_REGION=${var.region}",
"git clone --branch ${var.github_test_repo_branch} ${var.github_test_repo}",
"cd amazon-cloudwatch-agent-test",
"go test ./test/sanity -p 1 -v",
"cd ..",
"validator.exe --validator-config=${module.validator.instance_validator_config} --preparation-mode=true",
var.use_ssm ? "powershell \"& 'C:\\Program Files\\Amazon\\AmazonCloudWatchAgent\\amazon-cloudwatch-agent-ctl.ps1' -a fetch-config -m ec2 -s -c ssm:${local.ssm_parameter_name}\"" : "powershell \"& 'C:\\Program Files\\Amazon\\AmazonCloudWatchAgent\\amazon-cloudwatch-agent-ctl.ps1' -a fetch-config -m ec2 -s -c file:${module.validator.instance_agent_config}\"",
"validator.exe --validator-config=${module.validator.instance_validator_config} --preparation-mode=false"
Expand Down

0 comments on commit 1d5554c

Please sign in to comment.