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

Add permission checks to all install and upgrade integration tests #4761

Merged
merged 14 commits into from
May 20, 2024

Conversation

blakerouse
Copy link
Contributor

What does this PR do?

Improves the integration install and upgrade tests for both Linux and Windows to ensure that the permissions set during installation and installation + enrollment are correct.

Why is it important?

Ensures that any future changes that can cause bad permissions are caught during the PR stage.

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

@blakerouse blakerouse self-assigned this May 15, 2024
@blakerouse blakerouse requested a review from a team as a code owner May 15, 2024 20:58
@elasticmachine
Copy link
Collaborator

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

@blakerouse
Copy link
Contributor Author

One of the issues here is that the Elastic Agent user was renamed from elastic-agent to elastic-agent-user in 8.14. This causes the tests that start at 8.13 and upgrade to fail, because the elastic-agent-user doesn't exist it is actually elastic-agent.

@blakerouse blakerouse enabled auto-merge (squash) May 20, 2024 13:57
@blakerouse blakerouse merged commit 07f7921 into elastic:main May 20, 2024
8 of 13 checks passed
Copy link

mergify bot pushed a commit that referenced this pull request May 20, 2024
…4761)

* Fix calling enroll from install.

* Refactor installation checks.

* Add detailed checks.

* Improve permission validation.

* Fix lint.

* Fix windows lint.

* More lint.

* Adjustments for <=8.13.

* Pass context into CheckSuccess.

* Fix upgradetest to only check installation for specific versions.

* Inverse logic.

(cherry picked from commit 07f7921)
@blakerouse blakerouse deleted the testing-install-perms branch May 20, 2024 15:36
blakerouse added a commit that referenced this pull request May 20, 2024
…4761) (#4778)

* Fix calling enroll from install.

* Refactor installation checks.

* Add detailed checks.

* Improve permission validation.

* Fix lint.

* Fix windows lint.

* More lint.

* Adjustments for <=8.13.

* Pass context into CheckSuccess.

* Fix upgradetest to only check installation for specific versions.

* Inverse logic.

(cherry picked from commit 07f7921)

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants