Update golangci-lint and turn it on in CI

This commit is contained in:
Dmitry Kropachev authored and Sylwia Szunejko committed 2024-06-19 08:08:54 +02:00
1 parent a9ab270196
commit ab80d70106
37 files changed
+225 -151

No files matched your search

+6 -2
View File
@@ -13,6 +13,7 @@ import (
"time"
"github.com/gocql/gocql"
"github.com/scylladb/gocqlx/v2"
)
@@ -31,8 +32,10 @@ var initOnce sync.Once
// CreateSession creates a new gocqlx session from flags.
func CreateSession(tb testing.TB) gocqlx.Session {
tb.Helper()
cluster := CreateCluster()
return createSessionFromCluster(cluster, tb)
return createSessionFromCluster(tb, cluster)
}
// CreateCluster creates gocql ClusterConfig from flags.
@@ -92,7 +95,8 @@ func CreateKeyspace(cluster *gocql.ClusterConfig, keyspace string) error {
return nil
}
func createSessionFromCluster(cluster *gocql.ClusterConfig, tb testing.TB) gocqlx.Session {
func createSessionFromCluster(tb testing.TB, cluster *gocql.ClusterConfig) gocqlx.Session {
tb.Helper()
if !flag.Parsed() {
flag.Parse()
}