amazon-cloudwatch-agent icon indicating copy to clipboard operation
amazon-cloudwatch-agent copied to clipboard

Add Sanity Check for Windows Integration Test

Open khanhntd opened this issue 3 years ago • 4 comments

Description of the issue

Based on the stackoverflow, Sanity check is

sanity test is just a casual term to mean that you're testing/confirming/validating something that should follow very clear and simple logic.

Applying to our agents, sanity check is confirming both CloudWatch Agent and ADOT Collector Agent are running independently and side-by-side as expected before our integration test. However, as part of moving agent to Github Repository Epic and we releases the external agent before internal, we could not know if our agent are still independent as usual and running as expected after each PR is merged.

Therefore, I propose to add a Sanity Check for Windows before running our integration test.

Description of Changes

By utilizing the existing Terraform IAC for Windows Integration Test, I add these changes:

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

After introduces the changes, I run the below command terraform apply -auto-approve github_repo={{my forked repo}} github_sha={{my commited sha in my forked repo}} s3_bucket={{my s3 bucket}}

which gives me the follow result

null_resource.integration_test: Still creating... [1m30s elapsed]
null_resource.integration_test: Still creating... [1m40s elapsed]
null_resource.integration_test: Still creating... [1m50s elapsed]
null_resource.integration_test: Still creating... [2m0s elapsed]
null_resource.integration_test (remote-exec): === RUN   TestAgentStatus
null_resource.integration_test: Still creating... [2m10s elapsed]
null_resource.integration_test: Still creating... [2m20s elapsed]
null_resource.integration_test: Still creating... [2m30s elapsed]
null_resource.integration_test: Still creating... [2m40s elapsed]
null_resource.integration_test: Still creating... [2m50s elapsed]
null_resource.integration_test (remote-exec): --- PASS: TestAgentStatus (44.84s)
null_resource.integration_test (remote-exec): PASS
null_resource.integration_test (remote-exec): ok        github.com/aws/amazon-cloudwatch-agent/integration/test/sanity  45.203s
null_resource.integration_test: Creation complete after 2m52s [id=8591283884920986776]

and running terraform destroy afterwards to destroy the resources which are created by terraform on my account.

Note

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make linter

khanhntd avatar May 28 '22 04:05 khanhntd

Codecov Report

Merging #478 (b16af7b) into master (3083957) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #478   +/-   ##
=======================================
  Coverage   56.85%   56.85%           
=======================================
  Files         374      374           
  Lines       17744    17744           
=======================================
  Hits        10089    10089           
  Misses       7064     7064           
  Partials      591      591           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar May 28 '22 04:05 codecov-commenter

This PR was marked stale due to lack of activity.

github-actions[bot] avatar Jun 06 '22 00:06 github-actions[bot]

This PR was marked stale due to lack of activity.

github-actions[bot] avatar Jul 03 '22 00:07 github-actions[bot]

This PR was marked stale due to lack of activity.

github-actions[bot] avatar Jul 24 '22 00:07 github-actions[bot]

@khanhntd there are merge conflicts with the main branch

SaxyPandaBear avatar Aug 30 '22 14:08 SaxyPandaBear

@khanhntd there are merge conflicts with the main branch

Yup I'm testing the port so will merge it after the test.

khanhntd avatar Aug 30 '22 14:08 khanhntd