Skip to content

Commit 54b16a4

Browse files
test(sqlmodule): use canonical tokens
Ultraworked with Sisyphus https://github.com/code-yeongyu/oh-my-opencode Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent bc4d58c commit 54b16a4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

modkit/data/sqlmodule/errors_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import (
88

99
func TestBuildErrorIncludesProvider(t *testing.T) {
1010
inner := errors.New("boom")
11-
be := &BuildError{Provider: "postgres", Token: "db", Stage: StageOpen, Err: inner}
11+
be := &BuildError{Provider: "postgres", Token: TokenDB, Stage: StageOpen, Err: inner}
1212
msg := be.Error()
1313

1414
if !strings.Contains(msg, "postgres provider build failed") {
1515
t.Fatalf("expected provider in message, got %q", msg)
1616
}
17-
if !strings.Contains(msg, "token=\"db\"") {
17+
if !strings.Contains(msg, "token=\"database.db\"") {
1818
t.Fatalf("expected token in message, got %q", msg)
1919
}
2020
if !strings.Contains(msg, "stage=open") {
@@ -27,7 +27,7 @@ func TestBuildErrorIncludesProvider(t *testing.T) {
2727

2828
func TestBuildErrorWithEmptyProviderUsesGenericPrefix(t *testing.T) {
2929
inner := errors.New("boom")
30-
be := &BuildError{Token: "db", Stage: StageOpen, Err: inner}
30+
be := &BuildError{Token: TokenDB, Stage: StageOpen, Err: inner}
3131
msg := be.Error()
3232

3333
if !strings.Contains(msg, "sql provider build failed") {

0 commit comments

Comments
 (0)