added golangci (#59)

This commit is contained in:
Michał Matczuk
2018-08-07 15:30:04 +02:00
parent 2f13a81c46
commit f8424b00b9
6 changed files with 43 additions and 42 deletions

View File

@@ -86,13 +86,13 @@ func createKeyspace(tb testing.TB, cluster *gocql.ClusterConfig, keyspace string
c.Timeout = 30 * time.Second
session, err := c.CreateSession()
if err != nil {
panic(err)
tb.Fatal(err)
}
defer session.Close()
err = ExecStmt(session, `DROP KEYSPACE IF EXISTS `+keyspace)
if err != nil {
panic(fmt.Sprintf("unable to drop keyspace: %v", err))
tb.Fatalf("unable to drop keyspace: %v", err)
}
err = ExecStmt(session, fmt.Sprintf(`CREATE KEYSPACE %s
@@ -102,7 +102,7 @@ func createKeyspace(tb testing.TB, cluster *gocql.ClusterConfig, keyspace string
}`, keyspace, *flagRF))
if err != nil {
panic(fmt.Sprintf("unable to create keyspace: %v", err))
tb.Fatalf("unable to create keyspace: %v", err)
}
}