Skip to content

Commit 464bdfe

Browse files
committed
fix tests
1 parent cdbbae3 commit 464bdfe

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

internal/pgengine/pgengine_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ func TestSamplesScripts(t *testing.T) {
177177
l := log.Init(config.LoggingOpts{LogLevel: "panic", LogDBLevel: "none"})
178178
pge := container.Engine
179179
for _, f := range files {
180+
if f.IsDir() {
181+
continue
182+
}
180183
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
181184
defer cancel()
182185
assert.NoError(t, pge.ExecuteCustomScripts(ctx, "../../samples/"+f.Name()),

internal/pgengine/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
type executor interface {
12-
Exec(ctx context.Context, sql string, arguments ...interface{}) (commandTag pgconn.CommandTag, err error)
12+
Exec(ctx context.Context, sql string, arguments ...any) (commandTag pgconn.CommandTag, err error)
1313
}
1414

1515
// Chain structure used to represent tasks chains

internal/pgengine/yaml.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// YamlChain represents a chain with tasks for YAML processing
1414
type YamlChain struct {
15-
Chain
15+
Chain `yaml:",inline"`
1616
ClientName string `db:"client_name" yaml:"client_name,omitempty"`
1717
Schedule string `db:"run_at" yaml:"schedule,omitempty"`
1818
Live bool `db:"live" yaml:"live,omitempty"`
@@ -21,9 +21,9 @@ type YamlChain struct {
2121

2222
// YamlTask extends the basic task structure with Parameters field
2323
type YamlTask struct {
24-
ChainTask
25-
TaskName string `db:"task_name" yaml:"name,omitempty"`
26-
Parameters []interface{} `yaml:"parameters,omitempty"`
24+
ChainTask `yaml:",inline"`
25+
TaskName string `db:"task_name" yaml:"name,omitempty"`
26+
Parameters []any `yaml:"parameters,omitempty"`
2727
}
2828

2929
// YamlConfig represents the root YAML configuration

0 commit comments

Comments
 (0)