修复日志持久化可靠性与数据库安全默认值
This commit is contained in:
@@ -32,8 +32,16 @@ func TestComposeUsesSafeDeploymentDefaults(t *testing.T) {
|
||||
t.Fatal("compose.yml is missing the thief_clickhouse service")
|
||||
}
|
||||
clickhouseService := compose[serviceStart:]
|
||||
if strings.Contains(clickhouseService, "\n ports:") {
|
||||
t.Error("ClickHouse must not publish host ports by default")
|
||||
for _, port := range []string{
|
||||
`${CLICKHOUSE_LISTEN_IP:-127.0.0.1}:${CLICKHOUSE_HTTP_PORT:-8123}:8123`,
|
||||
`${CLICKHOUSE_LISTEN_IP:-127.0.0.1}:${CLICKHOUSE_NATIVE_PORT:-9000}:9000`,
|
||||
} {
|
||||
if !strings.Contains(clickhouseService, port) {
|
||||
t.Errorf("ClickHouse port must bind to loopback by default with %q", port)
|
||||
}
|
||||
}
|
||||
if !strings.Contains(envExample, "CLICKHOUSE_LISTEN_IP=127.0.0.1\n") {
|
||||
t.Error(".env.example must bind ClickHouse to loopback by default")
|
||||
}
|
||||
|
||||
for _, emptySecret := range []string{"CLICKHOUSE_URL=\n", "CLICKHOUSE_PASSWORD=\n"} {
|
||||
|
||||
Reference in New Issue
Block a user