mirror of
https://github.com/hanzoai/tasks.git
synced 2026-11-03 03:56:04 +00:00
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).
79 lines
2.0 KiB
Go
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)
|
|
}
|