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

External container integration tests #376

Merged
merged 8 commits into from
Jan 7, 2021

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Dec 23, 2020

This PR adds configuration to pom.xml for the ContainerJFR integration test container instance to be wrapped into a pod, which is also set up and torn down when the integration test run starts/ends.

A new test utility class is added which, for now, simply contains some helper methods to perform podman invocations as subprocesses, for running/stopping containers within the integration test pod.

Finally, a new integration test class is added which uses the above utility to run a vertx-fib-demo instance, wait for it to be in running state, waits a bit more for JDP discovery to pick it up, and then simply tests that the ContainerJFR test instance is able to discover it.


1. Marked as "draft" currently because when running the integration tests, the test runner reports that 2 tests were run in the new class - one skipped, and one (implicitly) passed. I'm not sure what the "skipped" test is supposed to be, where it comes from, or why it is skipped.
2. The failsafe report for the new test class contains this:

<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-failsafe-plugin/xsd/failsafe-test-report-3.0.xsd" version="3.0" name="itest.ConnectToExternalTargetsIT" time="9.255" tests="2" errors="0" skipped="1" failures="0">
...
  <testcase name="" classname="itest.BasicCommandChannelIT" time="0">
    <skipped message="class itest.BasicCommandChannelIT is @Disabled"/>
  </testcase>
  <testcase name="testOtherContainerFound" classname="itest.ConnectToExternalTargetsIT" time="0.008"/>
</testsuite>

For some reason in main, the BasicCommandChannelIT is simply not even run/reported. I'm not sure why the test runner does this.

@andrewazores andrewazores force-pushed the external-container-tests branch from 1133c16 to 6628340 Compare December 23, 2020 21:39
@andrewazores andrewazores marked this pull request as draft December 23, 2020 21:44
Add test and utils to run an external container within the test pod, check that ContainerJFR discovers it, and then tear down
@andrewazores andrewazores force-pushed the external-container-tests branch from 6628340 to 0aa1607 Compare December 24, 2020 14:37
@andrewazores andrewazores marked this pull request as ready for review December 24, 2020 15:21
@andrewazores andrewazores force-pushed the external-container-tests branch 3 times, most recently from c958c86 to e182fa3 Compare December 24, 2020 15:33
@andrewazores andrewazores force-pushed the external-container-tests branch 3 times, most recently from b536515 to 38ee656 Compare December 24, 2020 16:09
@andrewazores andrewazores merged commit d332be1 into cryostatio:main Jan 7, 2021
@andrewazores andrewazores deleted the external-container-tests branch January 7, 2021 19:34
andrewazores added a commit to andrewazores/cryostat that referenced this pull request Jan 7, 2021
* Update instructions for manual itest rerun

* Set up test container inside a pod

* Add basic external container discovery test

Add test and utils to run an external container within the test pod, check that ContainerJFR discovers it, and then tear down

* Move utility classes into util package

* Mark test as disabled rather than commented out

* Rename base class

* Set pod name as property rather than hard-coded

* Refactoring
andrewazores added a commit that referenced this pull request Jan 8, 2021
* External container integration tests (#376)

* Update instructions for manual itest rerun

* Set up test container inside a pod

* Add basic external container discovery test

Add test and utils to run an external container within the test pod, check that ContainerJFR discovers it, and then tear down

* Move utility classes into util package

* Mark test as disabled rather than commented out

* Rename base class

* Set pod name as property rather than hard-coded

* Refactoring

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

Successfully merging this pull request may close these issues.

2 participants