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

[8.x](backport #6212) Enhancement/5832 deb rpm docker tests #6422

Open
wants to merge 2 commits into
base: 8.x
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 20, 2024

  • Enhancement

What does this PR do?

Adds tests validating elastic-agent upgrade command does not and should not work for deb, rpm and docker.

Why is it important?

We currently don't have any tests validating that the upgrade command does not work

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

  • Build deb, rpm packages and docker images
  • Run the following commands
 TEST_PACKAGES='deb' SNAPSHOT=true TEST_GROUPS="deb" TEST_PLATFORMS="linux/amd64" GOTEST_FLAGS='-test.run ^TestRestrictUpgradeDeb$' mage integration:test
 TEST_PACKAGES='rpm' SNAPSHOT=true TEST_GROUPS="rpm" TEST_PLATFORMS="linux/amd64" GOTEST_FLAGS='-test.run ^TestRestrictUpgradeRPM$' mage integration:test
K8S_VERSION=v1.31.0 TEST_INTEG_CLEAN_ON_EXIT=true INSTANCE_PROVISIONER=kind STACK_PROVISIONER=stateful TEST_PLATFORMS="kubernetes/arm64/1.31.0/<IMAGE TYPE>" SNAPSHOT=true mage integration:kubernetes

The image type can be basic, wolfi or any other listed in the test itself

Related issues


This is an automatic backport of pull request #6212 done by [Mergify](https://mergify.com).

* enhancement(5832): added integration tests

* enhancement(5832): updated fixture install, updated assertions

* enhancement(5832): added kubernetes test

* enhancement(5832): ran mage update

* enhancement(5832): execute rpm test in default group

* Revert "enhancement(5832): execute rpm test in default group"

This reverts commit fa93a8e.

* enhancement(5832): debugging ci issues

* enahancement(5832): added logs to see if any other agent is running, commented out other integration tests

* enhancement(5832): added cleanup steps to rpm tests

* enhancement(5832): trying 777 permission

* enhancement(5832): removed diagnostics, added rpm cleanup step that purges all agent files

* enhancement(5832): running all tests

* enhancement(5832): uncommented integration test pipeline

* enhancement(5832): reverting unnecessary changes

* enhancement(5832): uncommenting integration tests

* enhancement(5832): reverted integration_tests.sh changes

* enhancement(5832): reverted fixture_install.go changes

* enhancement(5832): remove print

* enhancement(5832): logging output if cleanup fails

* enhancement(5832): updated k8s test, refactored upgrade test into test step

(cherry picked from commit 3f608bf)
@mergify mergify bot requested a review from a team as a code owner December 20, 2024 15:48
@mergify mergify bot added the backport label Dec 20, 2024
@mergify mergify bot requested review from andrzej-stencel and pchila and removed request for a team December 20, 2024 15:48
Copy link
Contributor Author

mergify bot commented Dec 23, 2024

This pull request has not been merged yet. Could you please review and merge it @kaanyalti? 🙏

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants