Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Support running tests in full VM's#1740

Merged
adam-stokes merged 130 commits into
masterfrom
vm-tester-feat
Nov 30, 2021
Merged

Support running tests in full VM's#1740
adam-stokes merged 130 commits into
masterfrom
vm-tester-feat

Conversation

@adam-stokes
Copy link
Copy Markdown
Contributor

@adam-stokes adam-stokes commented Oct 28, 2021

  • Orchestrates deploying pure vm's for both amd64/arm64, utilizing ansible. Windows support coming next in followup
  • Provides uniqueness with policies and integrations so that all test suites can run against a single deployed stack
  • Update the step definitions to be a little more platform agnostic, still more work to do there in followup pr's

Signed-off-by: Adam Stokes 51892+adam-stokes@users.noreply.github.com

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 run the Unit tests (make unit-test), and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

How to test this PR locally

Please see .ci/README.md

Related issues

This gives us full vm's to run our e2e tests in. Supports both Linux
amd64/arm64, and will support Windows.

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Oct 28, 2021

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

  • v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@mergify mergify Bot added the backport-skip Skip notification from the automated backport with mergify label Oct 28, 2021
Comment thread .ci/Jenkinsfile Outdated
def checkTestSuite(Map parallelTasks = [:], Map item = [:]) {
def suite = item.suite
def platforms = item.platforms
def sshexec(connection, cmd){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

candidate to be a step in the library :D

Comment thread .ci/Jenkinsfile Outdated
sh "ssh -tt -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${env.WORKSPACE}/${env.BASE_DIR}/e2essh ${connection} -- '${cmd}'"
}

def scpr(connection, remote_src, local_dst){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

candidate to be a step in the library :D

Comment thread .ci/Jenkinsfile Outdated
Comment thread .ci/Jenkinsfile Outdated
Comment thread .ci/ansible/playbook.yml Outdated
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Oct 28, 2021

💚 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: 2021-11-30T16:05:37.301+0000

  • Duration: 43 min 18 sec

  • Commit: 6cd07fa

Test stats 🧪

Test Results
Failed 0
Passed 86
Skipped 0
Total 86

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

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

  • /test : Re-trigger the build.

@adam-stokes
Copy link
Copy Markdown
Contributor Author

/test

1 similar comment
@adam-stokes
Copy link
Copy Markdown
Contributor Author

/test

Comment thread .ci/.e2e-tests.yaml Outdated
Comment thread .ci/Jenkinsfile Outdated
Comment thread .ci/Jenkinsfile Outdated
/*
* Runs python in venv
*/
def pyrun(args){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Another candidate for the library?

Comment thread .ci/Jenkinsfile Outdated
Comment thread .ci/Jenkinsfile Outdated
Comment thread .ci/Jenkinsfile Outdated
Comment thread .ci/ansible/roles/common/tasks/setup_test_script.yml Outdated
adam-stokes and others added 7 commits November 3, 2021 07:29
Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
The expression in the e2e-tests already handles both skip_tests and
force_skip_git_checks. We make use of the skip_tests env here to skip those test
suites if no files are changed

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
@adam-stokes
Copy link
Copy Markdown
Contributor Author

/test

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
@adam-stokes adam-stokes merged commit 8a94011 into master Nov 30, 2021
@mergify mergify Bot deleted the vm-tester-feat branch November 30, 2021 16:56
@adam-stokes adam-stokes added backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify backport-v8.0.0 Automated backport with mergify and removed backport-skip Skip notification from the automated backport with mergify labels Nov 30, 2021
mergify Bot pushed a commit that referenced this pull request Nov 30, 2021
* Support running e2e in VM's

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
(cherry picked from commit 8a94011)

# Conflicts:
#	.ci/Jenkinsfile
mergify Bot pushed a commit that referenced this pull request Nov 30, 2021
* Support running e2e in VM's

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
(cherry picked from commit 8a94011)

# Conflicts:
#	.ci/Jenkinsfile
#	.gitignore
mergify Bot pushed a commit that referenced this pull request Nov 30, 2021
* Support running e2e in VM's

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
(cherry picked from commit 8a94011)

# Conflicts:
#	.ci/.e2e-tests.yaml
#	.ci/Jenkinsfile
#	.gitignore
#	e2e/_suites/fleet/features/fleet_mode_agent.feature
#	e2e/_suites/fleet/features/preconfigured_policies.feature
#	e2e/_suites/fleet/fleet.go
#	go.sum
adam-stokes added a commit that referenced this pull request Nov 30, 2021
* Support running tests in full VM's (#1740)

* Support running e2e in VM's

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
(cherry picked from commit 8a94011)

# Conflicts:
#	.ci/Jenkinsfile

* Fix conflict

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>

Co-authored-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
adam-stokes added a commit that referenced this pull request Nov 30, 2021
* Support running tests in full VM's (#1740)

* Support running e2e in VM's

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
(cherry picked from commit 8a94011)

# Conflicts:
#	.ci/Jenkinsfile
#	.gitignore

* Fix conflicts

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>

Co-authored-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
mdelapenya added a commit that referenced this pull request Dec 15, 2021
* Support running tests in full VM's (#1740)

* Support running e2e in VM's

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
(cherry picked from commit 8a94011)

# Conflicts:
#	.ci/.e2e-tests.yaml
#	.ci/Jenkinsfile
#	.gitignore
#	e2e/_suites/fleet/features/fleet_mode_agent.feature
#	e2e/_suites/fleet/features/preconfigured_policies.feature
#	e2e/_suites/fleet/fleet.go
#	go.sum

* Fix conflicts

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>

* fix: remove not implemented function call

The backport added a reference to code implemented in:

   Test preconfigured agent policies and output  (#1680)

But this PR was not backported to 7.15 because there is no support to
preconfigured policies.

Co-authored-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
v1v added a commit to v1v/e2e-testing that referenced this pull request Jun 16, 2022
otherwise it fails in the ephemeral workers

relative path was added in elastic#1740
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify backport-v8.0.0 Automated backport with mergify

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants