Files
tasks/tools/tests/postgresql_cli_test.go
zeekay 5a601d081b rebrand: go.temporal.io/server -> github.com/hanzoai/tasks
Full module path rebrand from Temporal to Hanzo Tasks:
- go.mod module: github.com/hanzoai/tasks
- All internal Go imports updated (1906 files)
- cmd/server renamed to cmd/tasksd
- Binary name: tasksd (was temporal-server)
- Docker images: hanzoai/tasks (was temporalio/server)
- README rewritten with Hanzo Tasks branding
- LLM.md created with integration notes
- Makefile, goreleaser, CI workflows updated
- go.temporal.io/sdk and go.temporal.io/api imports preserved (separate repos)

Fork of Temporal.io (MIT license).
2026-03-19 10:36:40 -07:00

79 lines
2.0 KiB
Go

package tests
import (
"strconv"
"testing"
"github.com/stretchr/testify/suite"
"github.com/hanzoai/tasks/common/persistence/sql/sqlplugin/postgresql"
postgresqlversionV12 "github.com/hanzoai/tasks/schema/postgresql/v12"
"github.com/hanzoai/tasks/temporal/environment"
"github.com/hanzoai/tasks/tools/sql/clitest"
)
type PostgresqlSuite struct {
suite.Suite
pluginName string
}
func (p *PostgresqlSuite) TestPostgreSQLConnTestSuite() {
suite.Run(p.T(), clitest.NewSQLConnTestSuite(
environment.GetPostgreSQLAddress(),
strconv.Itoa(environment.GetPostgreSQLPort()),
p.pluginName,
testPostgreSQLQuery,
))
}
func (p *PostgresqlSuite) TestPostgreSQLHandlerTestSuite() {
suite.Run(p.T(), clitest.NewHandlerTestSuite(
environment.GetPostgreSQLAddress(),
strconv.Itoa(environment.GetPostgreSQLPort()),
p.pluginName,
))
}
func (p *PostgresqlSuite) TestPostgreSQLSetupSchemaTestSuite() {
suite.Run(p.T(), clitest.NewSetupSchemaTestSuite(
environment.GetPostgreSQLAddress(),
strconv.Itoa(environment.GetPostgreSQLPort()),
p.pluginName,
testPostgreSQLQuery,
))
}
func (p *PostgresqlSuite) TestPostgreSQLUpdateSchemaTestSuite() {
suite.Run(p.T(), clitest.NewUpdateSchemaTestSuite(
environment.GetPostgreSQLAddress(),
strconv.Itoa(environment.GetPostgreSQLPort()),
p.pluginName,
testPostgreSQLQuery,
testPostgreSQLExecutionSchemaVersionDir,
postgresqlversionV12.Version,
testPostgreSQLVisibilitySchemaVersionDir,
postgresqlversionV12.VisibilityVersion,
))
}
func (p *PostgresqlSuite) TestPostgreSQLVersionTestSuite() {
suite.Run(p.T(), clitest.NewVersionTestSuite(
environment.GetPostgreSQLAddress(),
strconv.Itoa(environment.GetPostgreSQLPort()),
p.pluginName,
testPostgreSQLExecutionSchemaFile,
testPostgreSQLVisibilitySchemaFile,
))
}
func TestPostgres(t *testing.T) {
t.Parallel()
s := &PostgresqlSuite{pluginName: postgresql.PluginName}
suite.Run(t, s)
}
func TestPostgresPGX(t *testing.T) {
t.Parallel()
s := &PostgresqlSuite{pluginName: postgresql.PluginNamePGX}
suite.Run(t, s)
}