-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[ci] Add 'mage test' to each project #17773
Merged
andrewkroh
merged 16 commits into
elastic:master
from
andrewkroh:feature-mage-test-target
Apr 21, 2020
Merged
[ci] Add 'mage test' to each project #17773
andrewkroh
merged 16 commits into
elastic:master
from
andrewkroh:feature-mage-test-target
Apr 21, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andresrc
added
[zube]: In Review
Team:Integrations
Label for the Integrations team
labels
Apr 19, 2020
Pinging @elastic/integrations (Team:Integrations) |
andrewkroh
force-pushed
the
feature-mage-test-target
branch
from
April 20, 2020 04:26
94b98dd
to
3fbf59c
Compare
jsoriano
reviewed
Apr 20, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! There are some things overlapping with #17799, the good thing is that they both go in the same direction 🙂 // cc @blakerouse
GoTestUnit and Fields are not longer required for Windows CI tests.
Ensure that each project has a test target. Additionally, if the project has unit tests then make sure it has an unitTest target. And likewise, an integTest target if the project has integration tests. This also ensures that for python notetests that the NOSE_TESTMATCH environment variable can be set to select a subset of tests to execute. For example `NOSE_TESTMATCH=test_kafka mage pythonIntegTest`.
Mage writes dashboards to build/kibana. The old Makefile convention was to use _meta/kibana.generated.
Each project is sharing the same python virtual environment as an optimization when using Mage. Metricbeat had one additional dependency than what was listed in libbeat's requirements.txt.
The mage integTest environment does not create a test.env file to pass to docker-compose. So move the variables into the docker-compose.yml file. If variables from a file are wanted at a later time then the built-in support for a ".env" file in docker-compose should be used instead. The python integration test was written to require code coverage instrumentation in the Go binaries. I updated the test to work when code coverage is not enabled.
This contains templates rather than .go files despite their file extensions.
Make travis happy.
We will fix the whole file later.
andrewkroh
force-pushed
the
feature-mage-test-target
branch
from
April 21, 2020 13:00
3fbf59c
to
e31aafa
Compare
jsoriano
approved these changes
Apr 21, 2020
All tests are green except the macOS generator test which is being fixed in #17782. |
andrewkroh
added a commit
to andrewkroh/beats
that referenced
this pull request
Apr 23, 2020
* Remove legacy Windows CI mage targets and files GoTestUnit and Fields are not longer required for Windows CI tests. * Ensure all projects have a test target Ensure that each project has a test target. Additionally, if the project has unit tests then make sure it has an unitTest target. And likewise, an integTest target if the project has integration tests. This also ensures that for python notetests that the NOSE_TESTMATCH environment variable can be set to select a subset of tests to execute. For example `NOSE_TESTMATCH=test_kafka mage pythonIntegTest`. * Fix metricbeat dashboard test Mage writes dashboards to build/kibana. The old Makefile convention was to use _meta/kibana.generated. * Add kafka-python to python requirements Each project is sharing the same python virtual environment as an optimization when using Mage. Metricbeat had one additional dependency than what was listed in libbeat's requirements.txt. * Update libbeat integ tests to work under mage The mage integTest environment does not create a test.env file to pass to docker-compose. So move the variables into the docker-compose.yml file. If variables from a file are wanted at a later time then the built-in support for a ".env" file in docker-compose should be used instead. The python integration test was written to require code coverage instrumentation in the Go binaries. I updated the test to work when code coverage is not enabled. * Decrease verbosity of the chown function when using mage -v * Test Metricbeat using mage directly * Ignore generators/_templates for goimports This contains templates rather than .go files despite their file extensions. * Add integTest stub to Packetbeat * Add integTest to Heartbeat magefile (cherry picked from commit 62b1e90)
3 tasks
andrewkroh
added a commit
that referenced
this pull request
Apr 24, 2020
* Remove legacy Windows CI mage targets and files GoTestUnit and Fields are not longer required for Windows CI tests. * Ensure all projects have a test target Ensure that each project has a test target. Additionally, if the project has unit tests then make sure it has an unitTest target. And likewise, an integTest target if the project has integration tests. This also ensures that for python notetests that the NOSE_TESTMATCH environment variable can be set to select a subset of tests to execute. For example `NOSE_TESTMATCH=test_kafka mage pythonIntegTest`. * Fix metricbeat dashboard test Mage writes dashboards to build/kibana. The old Makefile convention was to use _meta/kibana.generated. * Add kafka-python to python requirements Each project is sharing the same python virtual environment as an optimization when using Mage. Metricbeat had one additional dependency than what was listed in libbeat's requirements.txt. * Update libbeat integ tests to work under mage The mage integTest environment does not create a test.env file to pass to docker-compose. So move the variables into the docker-compose.yml file. If variables from a file are wanted at a later time then the built-in support for a ".env" file in docker-compose should be used instead. The python integration test was written to require code coverage instrumentation in the Go binaries. I updated the test to work when code coverage is not enabled. * Decrease verbosity of the chown function when using mage -v * Test Metricbeat using mage directly * Ignore generators/_templates for goimports This contains templates rather than .go files despite their file extensions. * Add integTest stub to Packetbeat * Add integTest to Heartbeat magefile (cherry picked from commit 62b1e90)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is a small enhancement to make sure that each project has a
mage test
. And where applicable amage unitTest
andmage integTest
.It also allows you to pass variables like NOSE_TESTMATCH=test_kafka to limit what system tests execute.
Why is it important?
This will make easier to update the Jenkinsfile because each project will have a
mage test
target. It will make address #17411 easier.Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added an entry inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Related issues
Commits
commit c9272cf563a5216cc1006d634cc549cdf5079b19
commit 91ecc2e7013d1081fd12b6805e7aeb8cdc948097
commit 2411d4fd5dae93f52db29c422d17960d021293b6
commit 0b0d5731e2bb5786643ffd2a24185723c53ed418
commit f6c56fe445eb6ec442e75c2bbb92ec9a2865b408
commit 0e01162e0ae179674de80d3d5a97c011e1536730
commit 23655244650db51f3feef9436ba68f0d937ef2d0
commit e40f0cc36ca743a0a7238f32da9e8b4de0612c99
commit 989b4b177c874654ff2eb4af92c573a6cbe2161e