File tree Expand file tree Collapse file tree
java/example/springdata/cassandra/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
2- * Copyright 2025 the original author or authors.
2+ * Copyright 2026 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2727import org .springframework .util .StringUtils ;
2828
2929import org .testcontainers .cassandra .CassandraContainer ;
30+ import org .testcontainers .utility .MountableFile ;
3031
3132import com .datastax .oss .driver .api .core .CqlSession ;
3233
@@ -101,6 +102,8 @@ private CassandraContainer runTestcontainer() {
101102
102103 container = new CassandraContainer (getCassandraDockerImageName ());
103104 container .withReuse (true );
105+ container .withCopyFileToContainer (MountableFile .forClasspathResource ("/cassandra.yml" ),
106+ "/etc/cassandra/cassandra.yaml" );
104107
105108 container .start ();
106109
@@ -110,6 +113,6 @@ private CassandraContainer runTestcontainer() {
110113 private String getCassandraDockerImageName () {
111114
112115 return String .format ("cassandra:%s" ,
113- Optional .ofNullable (System .getenv ("CASSANDRA_VERSION" )).filter (StringUtils ::hasText ).orElse ("5.0.4 " ));
116+ Optional .ofNullable (System .getenv ("CASSANDRA_VERSION" )).filter (StringUtils ::hasText ).orElse ("5.0.6 " ));
114117 }
115118}
You can’t perform that action at this time.
0 commit comments