Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
fix another one
Browse files Browse the repository at this point in the history
  • Loading branch information
kobeyang committed Jul 17, 2017
1 parent 16a9de9 commit 5b53ce3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions clients/metadata/util.go
Expand Up @@ -163,11 +163,18 @@ func (s *TestCluster) SetupTestCluster() {
s.createKeyspace(1)
s.loadSchema("schema/metadata.cql")

auth := configure.Authentication{
Enabled: true,
Username: "cassandra",
Password: "cassandra",
}

var err error
s.client, err = NewCassandraMetadataService(&configure.MetadataConfig{
CassandraHosts: ip,
Keyspace: s.keyspace,
Consistency: "One",
Authentication: auth,
})
if err != nil {
log.Fatal(err)
Expand All @@ -186,6 +193,10 @@ func (s *TestCluster) createCluster(clusterHosts string, cons gocql.Consistency,
s.cluster.Keyspace = "system"
s.cluster.Timeout = 40 * time.Second
s.cluster.ProtoVersion = cassandraProtoVersion
s.cluster.Authenticator = gocql.PasswordAuthenticator{
Username: "cassandra",
Password: "cassandra",
}
var err error
s.session, err = s.cluster.CreateSession()
if err != nil {
Expand Down

0 comments on commit 5b53ce3

Please sign in to comment.