Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/5320 add integration test escape secrets in policy #5987

Conversation

kaanyalti
Copy link
Contributor

@kaanyalti kaanyalti commented Nov 11, 2024

  • Enhancement

What does this PR do?

Adds integration test for testing escaping secrets in the agent config. This test case replicates the steps outlined in the following issue.

Why is it important?

We currently don't have integration tests covering this use case

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

How to test this PR locally

Run GOTEST_FLAGS='-test.run ^TestEscapingSecretsInPolicy$' mage integration:test for the platforms and packages that you want

Related issues

@kaanyalti kaanyalti marked this pull request as ready for review November 11, 2024 02:39
@kaanyalti kaanyalti requested a review from a team as a code owner November 11, 2024 02:39
Copy link
Contributor

mergify bot commented Nov 11, 2024

This pull request does not have a backport label. Could you fix it @kaanyalti? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit

Copy link
Contributor

mergify bot commented Nov 11, 2024

backport-v8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label and remove the backport-8.x label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Nov 11, 2024
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Nov 11, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@kaanyalti kaanyalti force-pushed the enhancement/5320_add_integration_test_escape_secrets_in_policy branch from 8435e50 to bcaad75 Compare November 11, 2024 13:54
@kaanyalti kaanyalti force-pushed the enhancement/5320_add_integration_test_escape_secrets_in_policy branch from c332c26 to cb9abce Compare November 13, 2024 12:54
@michalpristas michalpristas added the enhancement New feature or request label Nov 13, 2024
Copy link

@kaanyalti kaanyalti requested a review from rdner November 13, 2024 14:47
Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Looks good, covers the test requirements.

@kaanyalti kaanyalti merged commit e6f7de4 into elastic:main Nov 14, 2024
15 checks passed
mergify bot pushed a commit that referenced this pull request Nov 14, 2024
* enhancement(5320): added integration test and package policy template

* enhancement(5320): updated struct

* enhancement(5320): added test case where we get install package and get diagnostics

* enhancement(5320): updated tests removed template file

* enhancement(5320): updated tests, fixed error in parsing pre-config

* enhancement(5320): added changelog

* enhancement(5320): ran mage addLicenseHeaders

* ehancement(5320): update import order

* enhancement(5320): added force flag to package installation

* enhancement(5320): remove duplicate force flag

* enhancement(5320): remove changelog

* enhancement(5320): updated test case, corrected assertion

(cherry picked from commit e6f7de4)
kaanyalti added a commit that referenced this pull request Nov 18, 2024
#6029)

* enhancement(5320): added integration test and package policy template

* enhancement(5320): updated struct

* enhancement(5320): added test case where we get install package and get diagnostics

* enhancement(5320): updated tests removed template file

* enhancement(5320): updated tests, fixed error in parsing pre-config

* enhancement(5320): added changelog

* enhancement(5320): ran mage addLicenseHeaders

* ehancement(5320): update import order

* enhancement(5320): added force flag to package installation

* enhancement(5320): remove duplicate force flag

* enhancement(5320): remove changelog

* enhancement(5320): updated test case, corrected assertion

(cherry picked from commit e6f7de4)

Co-authored-by: Kaan Yalti <kaan.yalti@elastic.co>
Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
blakerouse pushed a commit to blakerouse/elastic-agent that referenced this pull request Nov 18, 2024
…ic#5987)

* enhancement(5320): added integration test and package policy template

* enhancement(5320): updated struct

* enhancement(5320): added test case where we get install package and get diagnostics

* enhancement(5320): updated tests removed template file

* enhancement(5320): updated tests, fixed error in parsing pre-config

* enhancement(5320): added changelog

* enhancement(5320): ran mage addLicenseHeaders

* ehancement(5320): update import order

* enhancement(5320): added force flag to package installation

* enhancement(5320): remove duplicate force flag

* enhancement(5320): remove changelog

* enhancement(5320): updated test case, corrected assertion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify enhancement New feature or request skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E2E Test: escaping secrets in policy
7 participants