Skip to content

Commit

Permalink
fix: remove session_id from consistently failing http test
Browse files Browse the repository at this point in the history
  • Loading branch information
SpencerTorres committed Feb 26, 2025
1 parent 5374fff commit a305118
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/std/connect_check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,19 @@ func TestStdConnCheck(t *testing.T) {
require.NoError(t, err)

dsns := map[clickhouse.Protocol]string{clickhouse.Native: fmt.Sprintf("clickhouse://%s:%d?username=%s&password=%s", env.Host, env.Port, env.Username, env.Password),
clickhouse.HTTP: fmt.Sprintf("http://%s:%d?username=%s&password=%s&session_id=session", env.Host, env.HttpPort, env.Username, env.Password)}
clickhouse.HTTP: fmt.Sprintf("http://%s:%d?username=%s&password=%s", env.Host, env.HttpPort, env.Username, env.Password)}
useSSL, err := strconv.ParseBool(clickhouse_tests.GetEnv("CLICKHOUSE_USE_SSL", "false"))
require.NoError(t, err)
if useSSL {
dsns = map[clickhouse.Protocol]string{clickhouse.Native: fmt.Sprintf("clickhouse://%s:%d?username=%s&password=%s&secure=true", env.Host, env.SslPort, env.Username, env.Password),
clickhouse.HTTP: fmt.Sprintf("https://%s:%d?username=%s&password=%s&session_id=session&secure=true", env.Host, env.HttpsPort, env.Username, env.Password)}
clickhouse.HTTP: fmt.Sprintf("https://%s:%d?username=%s&password=%s&secure=true", env.Host, env.HttpsPort, env.Username, env.Password)}
}
for name, dsn := range dsns {
if name == clickhouse.Native && useSSL {
//TODO: test fails over native and SSL - requires investigation
continue
}
t.Run(fmt.Sprintf("%s Protocol", name), func(t *testing.T) {

connect, err := GetConnectionFromDSN(dsn)
require.NoError(t, err)
// We can only change the settings at the connection level.
Expand Down

0 comments on commit a305118

Please sign in to comment.