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

Blog post: Testing on Kubernetes with Arquillian Cube #742

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fabiobrz
Copy link
Contributor

SSIA

@fabiobrz fabiobrz force-pushed the mini-series.k8s-cube branch from a4ac878 to b10396a Compare February 24, 2025 12:45
@fabiobrz
Copy link
Contributor Author

Hi @jamezp - could you please review this one? 🙏

Copy link
Contributor

@bstansberry bstansberry left a comment

Choose a reason for hiding this comment

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

I made a bunch of copy edit suggestions.


That's cool!... but still, it is based on manual steps.

In order to do so, we'll modify the example application that we showcased in
Copy link
Contributor

Choose a reason for hiding this comment

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

s/do so/automate this/g


As said, we will to start from the
https://www.wildfly.org/news/2025/01/27/testing-on-docker-with-cube/[Testing WildFly applications on Docker with Arquillian Cube] article, so make sure to go through it, and maybe create a separate Git repo, or branch if you want to keep working on
both the examples, then...
Copy link
Contributor

Choose a reason for hiding this comment

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

s/both the/both

port: 9990
----

and - rather than applying it manually to our _Minikube_ instance via a `kubectl` command, we'll let Arquillian Cube do the job!
Copy link
Contributor

Choose a reason for hiding this comment

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

s/command,/command -/g

or change the first ' -' to a comma.

classpath.

If such a definition exists, then Arquillian Cube will apply it to the cluster, and it will provide us with APIs and
annotations at the class level, that we'll use to wire the test logic up, as we'll see later on.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/level,/level/g

A few changes, provided we started from the previous article about
https://www.wildfly.org/news/2025/01/27/testing-on-docker-with-cube/[Testing WildFly applications on Docker with Arquillian Cube].

The first thing we need to do is to add a couple more property for two new dependency that we'll need to add, details
Copy link
Contributor

Choose a reason for hiding this comment

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

s/property/properties
s/dependency/dependencies
s/add,/add;/g

----

Now, onto the (`<build>/<plugins>` section, first off we don't need for the `maven-clean-plugin` to clean up any
Docker files, in fact we'll remove those from our project sources later on, since this test will not build nor run any
Copy link
Contributor

Choose a reason for hiding this comment

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

s/files,/files;/g


Now, onto the (`<build>/<plugins>` section, first off we don't need for the `maven-clean-plugin` to clean up any
Docker files, in fact we'll remove those from our project sources later on, since this test will not build nor run any
Docker images, let's comment the section as follows:
Copy link
Contributor

Choose a reason for hiding this comment

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

s/images, let's/images. Let's/g


=== Remove the application sources

Again, we're not building any application here, we rely on a DOcker image on Quay, that contains the application
Copy link
Contributor

Choose a reason for hiding this comment

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

s/here, we/here. We/g
s/DOcker/Docker/g
s/Quay,/Quay/g

=== Remove the application sources

Again, we're not building any application here, we rely on a DOcker image on Quay, that contains the application
already, therefore we don't need the application sources, which can be safely removed:
Copy link
Contributor

Choose a reason for hiding this comment

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

s/already,/already;/g

we verify that the service - which is implemented by a Kubernetes workload - returns HTTP 200 and the expected response
body when it is called via its URL.

And that is where Arquillian Cube comes in handy because, thanks to it, we could inject such URL in our test class
Copy link
Contributor

Choose a reason for hiding this comment

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

s/such URL/such a URL/g

@fabiobrz fabiobrz force-pushed the mini-series.k8s-cube branch from b10396a to 9196cb6 Compare March 3, 2025 16:47
@fabiobrz
Copy link
Contributor Author

fabiobrz commented Mar 3, 2025

I made a bunch of copy edit suggestions.

Thanks for your review @bstansberry ! Hopefully I addressed your comments (and rebased, hence maybe not so easily visible, sorry about that).

@fabiobrz fabiobrz requested a review from bstansberry March 4, 2025 09:59
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