Skip to content

Conversation

@bhapas
Copy link
Contributor

@bhapas bhapas commented Jul 20, 2023

Add system tests for awss3 input in aws_logs integration

What does this PR do?

Adds system test by using terraform service deployer and using the SQS queue_url generated in terraform outputs.

Created test after the implementation of elastic/elastic-package#1272

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
    - [ ] I have verified that all data streams collect metrics or logs.
    - [ ] I have added an entry to my package's changelog.yml file.
    - [ ] I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

  • Setup AWS credentials and add AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to the env vars.
  • Navigate to packages/aws_logs
  • Spin up elastic stack using elastic-package stack up -d -v
  • Run tests using elastic-package test system -v
  • Take down elastic stack elastic-package stack down -v

@bhapas bhapas added enhancement New feature or request Team:Security-External Integrations Team:Cloud-Monitoring Label for the Cloud Monitoring team labels Jul 20, 2023
@bhapas bhapas self-assigned this Jul 20, 2023
@elasticmachine
Copy link

elasticmachine commented Jul 20, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-07-25T06:56:15.966+0000

  • Duration: 17 min 14 sec

Test stats 🧪

Test Results
Failed 0
Passed 3
Skipped 0
Total 3

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Jul 20, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚
Classes 100.0% (0/0) 💚
Methods 100.0% (3/3) 💚 4.938
Lines 100.0% (0/0) 💚 20.154
Conditionals 100.0% (0/0) 💚

@bhapas bhapas marked this pull request as ready for review July 20, 2023 09:40
@bhapas bhapas requested a review from a team as a code owner July 20, 2023 09:40
@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@kaiyan-sheng
Copy link
Contributor

@bhapas Thank you so much for working on this! Quick question, are we testing logs ingestion using aws-s3 input here? Are we sending any sample log into S3 bucket and expect a notification message generated in SQS queue and read by the aws-s3 input?

@bhapas
Copy link
Contributor Author

bhapas commented Jul 25, 2023

@bhapas Thank you so much for working on this! Quick question, are we testing logs ingestion using aws-s3 input here? Are we sending any sample log into S3 bucket and expect a notification message generated in SQS queue and read by the aws-s3 input?

@kaiyan-sheng Yes.. So , we have an S3 and SQS and when some object is Put into S3 , an SQS Notification is configured and the integration reads the logs through SQS queue_url. The queue_url is dynamically generated by terraform and is read through the system test config using handlebars template like queue_url: '{{TF_OUTPUT_queue_url}}'.

@bhapas bhapas requested a review from kaiyan-sheng July 25, 2023 11:27
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bhapas bhapas merged commit ce213a3 into elastic:main Jul 26, 2023
@andrewkroh andrewkroh added the Integration:aws_logs Custom AWS Logs label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Integration:aws_logs Custom AWS Logs Team:Cloud-Monitoring Label for the Cloud Monitoring team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants