Files
Alex ShtinandGitHub 8e8f1b0f7c Remove license header from every file (#7689)
## What changed?
<!-- Describe what has changed in this PR -->
Remove license header from every file. Because it is really hard to
follow in this PR here is the summary:
1. License header is removed from all `.go` and `.proto` files
:fireworks::fireworks:🎆.
2. `LICENSE` file in the root directory has only Temporal and Uber
copyrights.
3. 5 other `LICENSE` files added to the packages which have copyrights
different from Temporal and Uber: Datadog, Xargin, "Mat Ryer, Tyler
Bunnell and contributors".
4. `license_file` flag is removed from all code generation tools.
5. `copyright_file` flag is removed from `go:generate mockgen`
directive.
6. All copyright related targets are removed from `Makefile`.
7. Updated Temporal copyright year to 2025 everywhere.

## Why?
<!-- Tell your future self why have you made these changes -->
I double checked with legal department that it is not needed to have
license header in every file. One file per repo is enough. I put all
copyrights to the root `LICENSE` file and removed header from all other
files. Also updated tools and `Makefile`.
2025-05-01 18:50:21 -07:00

93 lines
3.0 KiB
Go

package persistencetests
import (
"go.temporal.io/server/common/config"
"go.temporal.io/server/common/persistence/sql/sqlplugin/mysql"
"go.temporal.io/server/common/persistence/sql/sqlplugin/postgresql"
"go.temporal.io/server/common/persistence/sql/sqlplugin/sqlite"
"go.temporal.io/server/temporal/environment"
)
const (
testMySQLUser = "temporal"
testMySQLPassword = "temporal"
testMySQLSchemaDir = "schema/mysql/v8"
testPostgreSQLUser = "temporal"
testPostgreSQLPassword = "temporal"
testPostgreSQLSchemaDir = "schema/postgresql/v12"
testSQLiteUser = ""
testSQLitePassword = ""
testSQLiteMode = "memory"
testSQLiteCache = "private"
testSQLiteSchemaDir = "schema/sqlite/v3" // specify if mode is not "memory"
)
// GetMySQLTestClusterOption return test options
func GetMySQLTestClusterOption() *TestBaseOptions {
return &TestBaseOptions{
SQLDBPluginName: mysql.PluginName,
DBUsername: testMySQLUser,
DBPassword: testMySQLPassword,
DBHost: environment.GetMySQLAddress(),
DBPort: environment.GetMySQLPort(),
SchemaDir: testMySQLSchemaDir,
StoreType: config.StoreTypeSQL,
}
}
// GetPostgreSQLTestClusterOption return test options
func GetPostgreSQLTestClusterOption() *TestBaseOptions {
return &TestBaseOptions{
SQLDBPluginName: postgresql.PluginName,
DBUsername: testPostgreSQLUser,
DBPassword: testPostgreSQLPassword,
DBHost: environment.GetPostgreSQLAddress(),
DBPort: environment.GetPostgreSQLPort(),
SchemaDir: testPostgreSQLSchemaDir,
StoreType: config.StoreTypeSQL,
}
}
// GetPostgreSQLPGXTestClusterOption return test options
func GetPostgreSQLPGXTestClusterOption() *TestBaseOptions {
return &TestBaseOptions{
SQLDBPluginName: postgresql.PluginNamePGX,
DBUsername: testPostgreSQLUser,
DBPassword: testPostgreSQLPassword,
DBHost: environment.GetPostgreSQLAddress(),
DBPort: environment.GetPostgreSQLPort(),
SchemaDir: testPostgreSQLSchemaDir,
StoreType: config.StoreTypeSQL,
}
}
// GetSQLiteFileTestClusterOption return test options
func GetSQLiteFileTestClusterOption() *TestBaseOptions {
return &TestBaseOptions{
SQLDBPluginName: sqlite.PluginName,
DBUsername: testSQLiteUser,
DBPassword: testSQLitePassword,
DBHost: environment.GetLocalhostIP(),
DBPort: 0,
SchemaDir: testSQLiteSchemaDir,
StoreType: config.StoreTypeSQL,
ConnectAttributes: map[string]string{"cache": testSQLiteCache},
}
}
// GetSQLiteMemoryTestClusterOption return test options
func GetSQLiteMemoryTestClusterOption() *TestBaseOptions {
return &TestBaseOptions{
SQLDBPluginName: sqlite.PluginName,
DBUsername: testSQLiteUser,
DBPassword: testSQLitePassword,
DBHost: environment.GetLocalhostIP(),
DBPort: 0,
SchemaDir: "",
StoreType: config.StoreTypeSQL,
ConnectAttributes: map[string]string{"mode": testSQLiteMode, "cache": testSQLiteCache},
}
}