Skip to content

Commit

Permalink
Merge branch 'origin/ecchronos-5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaeab committed Oct 21, 2024
2 parents 8e269dd + ed72634 commit a57da53
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cassandra-test-image/src/main/docker/ecc-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ if [ -f /etc/certificates/.keystore ]; then
sed -i "/client_encryption_options:/{n;s/enabled: false/enabled: true/}" "$CASSANDRA_CONF"/cassandra.yaml

sed -i "s;keystore: .*;keystore: /etc/certificates/.keystore;g" "$CASSANDRA_CONF"/cassandra.yaml
sed -i "s/keystore_password: .*/keystore_password: ecctest/g" "$CASSANDRA_CONF"/cassandra.yaml
# Cassandra 5: 'keystore_password' must not be empty, e.g. remove comment if present
sed -ri "s/( *)(# *)?keystore_password: .*/\1keystore_password: ecctest/g" "$CASSANDRA_CONF"/cassandra.yaml

sed -ri "s;(# )?truststore: .*;truststore: /etc/certificates/.truststore;g" "$CASSANDRA_CONF"/cassandra.yaml
sed -ri "s/(# )?truststore_password: .*/truststore_password: ecctest/g" "$CASSANDRA_CONF"/cassandra.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ public class AbstractCassandraContainerTest
@BeforeClass
public static void setUpCluster()
{
node = new CassandraContainer<>(DockerImageName.parse("cassandra:4.1.5"))
// This is set as an environment variable ('it.cassandra.version') in maven using the '-D' flag.
String cassandraVersion = System.getProperty("it.cassandra.version");
if (cassandraVersion == null)
{
// No environment version set, just use latest.
cassandraVersion = "latest";
}
node = new CassandraContainer<>(DockerImageName.parse("cassandra:" + cassandraVersion))
.withExposedPorts(9042, 7000, 7199)
.withEnv("CASSANDRA_DC", "DC1")
.withEnv("CASSANDRA_ENDPOINT_SNITCH", "GossipingPropertyFileSnitch")
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<!-- Integration tests -->
<it.cassandra.memory>1073741824</it.cassandra.memory>
<it.cassandra.heap>256M</it.cassandra.heap>
<it.cassandra.version>4.0</it.cassandra.version>
<it.cassandra.version>latest</it.cassandra.version>
</properties>

<dependencyManagement>
Expand Down

0 comments on commit a57da53

Please sign in to comment.