I forgot to mention that in the future this will not be used for testing AWS 
IDSv2 only. There are other snitches we have which are also calling similar 
"services" to get some metadata from an instance a node runs in and this 
communication is currently not tested at all. I can pretty much imagine that 
the testing efforts might be expanded to all other snitches as well. 

________________________________________
From: Miklosovic, Stefan
Sent: Tuesday, June 20, 2023 13:35
To: dev@cassandra.apache.org
Subject: Adding wiremock to test dependencies

Hi,

we want to introduce wiremock library (1) into the project as a test dependency 
to test CASSANDRA-16555.

In that patch, (wip here (2)), we want to test how would such snitch behave 
based on what Amazon EC2 Identity Service of version 2 returned to that snitch. 
AWS Identity service of version 2 is necessary to call in order to get a token 
with which a snitch is going to get AZ of a node it is called from.

The last comment of mine in (3) elaborates about approaches we were considering 
and mocking http communication / requests with wiremock seems to be like the 
most comfortable and straightforward solution.

Wiremock is Apache licence 2.0 (4) and is well maintained.

Are people OK with us introducing this to the build?

(1) https://wiremock.org/
(2) 
https://github.com/apache/cassandra/pull/2403/files#diff-dc04778c6659040f1c00f37e97a9b1530a532d3d1e3620427bd6628d1b2ec048
(3) https://issues.apache.org/jira/browse/CASSANDRA-16555
(4) https://github.com/wiremock/wiremock/blob/master/LICENSE.txt

Regards

Reply via email to