Skip to content

Commit 3bc5eac

Browse files
author
Michael Fero
committed
CPP-890 - Update CCM bridge to work with C* 4.0 alpha releases
1 parent c97dd43 commit 3bc5eac

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

tests/src/integration/ccm/bridge.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ bool CCM::Bridge::create_cluster(std::vector<unsigned short> data_center_nodes,
334334
create_command.push_back("git:" + branch_tag_);
335335
}
336336
} else {
337-
create_command.push_back(cassandra_version_.to_string());
337+
create_command.push_back(cassandra_version_.ccm_version());
338338
}
339339
} else {
340340
if (use_git_) {
@@ -344,7 +344,7 @@ bool CCM::Bridge::create_cluster(std::vector<unsigned short> data_center_nodes,
344344
create_command.push_back("git:" + branch_tag_);
345345
}
346346
} else {
347-
create_command.push_back(dse_version_.to_string());
347+
create_command.push_back(dse_version_.ccm_version());
348348
}
349349
if (dse_credentials_type_ == DseCredentialsType::USERNAME_PASSWORD) {
350350
create_command.push_back("--dse-username=" + dse_username_);

tests/src/integration/ccm/cass_version.hpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class CassVersion {
5555
: major_version(0)
5656
, minor_version(0)
5757
, patch_version(0)
58-
, extra("") {
58+
, extra("")
59+
, ccm_version_(version_string) {
5960
from_string(version_string);
6061
}
6162

@@ -233,6 +234,13 @@ class CassVersion {
233234
*/
234235
bool operator>=(const std::string& version) { return compare(CassVersion(version)) >= 0; }
235236

237+
/**
238+
* Get the CCM version that was used
239+
*
240+
* @return CCM version string
241+
*/
242+
const std::string& ccm_version() const { return ccm_version_; }
243+
236244
/**
237245
* Convert the version into a human readable string
238246
*
@@ -256,6 +264,12 @@ class CassVersion {
256264
return version_string.str();
257265
}
258266

267+
private:
268+
/**
269+
* CCM version string that was supplied
270+
*/
271+
std::string ccm_version_;
272+
259273
private:
260274
/**
261275
* Convert the version from human readable string to version parameters

0 commit comments

Comments
 (0)