Skip to content

Commit 0d998dd

Browse files
committed
CI: use libsql-server instead of sqld
Signed-off-by: Piotr Jastrzebski <[email protected]>
1 parent a6656fe commit 0d998dd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/go.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
services:
1818
sqld:
19-
image: ghcr.io/libsql/sqld:latest
19+
image: ghcr.io/tursodatabase/libsql-server:latest
2020
ports:
2121
- 8080:8080
2222

test/db_root_command_shell_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func (s *DBRootCommandShellSuite) Test_GivenAEmptyTable_WhenCallDotDumpCommand_E
187187
s.tc.Assert(errS, qt.Equals, "")
188188
prefix := "PRAGMA foreign_keys=OFF;\nBEGIN TRANSACTION;\nCREATE TABLE"
189189
if !strings.HasSuffix(s.dbUri, "test.sqlite") {
190-
prefix += " if not exists libsql_wasm_func_table (name text primary key, body text) without rowid;\nCREATE TABLE if not exists"
190+
prefix += " if not exists"
191191
}
192192
expected := " alltypes (textNullable text, textNotNullable text NOT NULL, textWithDefault text DEFAULT 'defaultValue', \n\tintNullable INTEGER, intNotNullable INTEGER NOT NULL, intWithDefault INTEGER DEFAULT '0', \n\tfloatNullable REAL, floatNotNullable REAL NOT NULL, floatWithDefault REAL DEFAULT '0.0', \n\tunknownNullable NUMERIC, unknownNotNullable NUMERIC NOT NULL, unknownWithDefault NUMERIC DEFAULT 0.0, \n\tblobNullable BLOB, blobNotNullable BLOB NOT NULL, blobWithDefault BLOB DEFAULT 'x\"0\"');\nCOMMIT;"
193193
s.tc.AssertSqlEquals(outS, prefix+expected)
@@ -205,7 +205,7 @@ func (s *DBRootCommandShellSuite) Test_GivenATableConainingRandomFields_WhenInse
205205

206206
prefix := "PRAGMA foreign_keys=OFF;\nBEGIN TRANSACTION;\nCREATE TABLE"
207207
if !strings.HasSuffix(s.dbUri, "test.sqlite") {
208-
prefix += " if not exists libsql_wasm_func_table (name text primary key, body text) without rowid;\nCREATE TABLE if not exists"
208+
prefix += " if not exists"
209209
}
210210
expected := " alltypes (t text, i integer, r real, b blob);\nINSERT INTO alltypes VALUES('text',99,3.14,X'0123456789ABCDEF');\nCOMMIT;"
211211

@@ -223,7 +223,7 @@ func (s *DBRootCommandShellSuite) Test_GivenATableConainingFieldsWithALLTypes_Wh
223223

224224
prefix := "PRAGMA foreign_keys=OFF;\nBEGIN TRANSACTION;\nCREATE TABLE"
225225
if !strings.HasSuffix(s.dbUri, "test.sqlite") {
226-
prefix += " if not exists libsql_wasm_func_table (name text primary key, body text) without rowid;\nCREATE TABLE if not exists"
226+
prefix += " if not exists"
227227
}
228228
expected := " alltypes (textNullable text, textNotNullable text NOT NULL, textWithDefault text DEFAULT 'defaultValue', \n\tintNullable INTEGER, intNotNullable INTEGER NOT NULL, intWithDefault INTEGER DEFAULT '0', \n\tfloatNullable REAL, floatNotNullable REAL NOT NULL, floatWithDefault REAL DEFAULT '0.0', \n\tunknownNullable NUMERIC, unknownNotNullable NUMERIC NOT NULL, unknownWithDefault NUMERIC DEFAULT 0.0, \n\tblobNullable BLOB, blobNotNullable BLOB NOT NULL, blobWithDefault BLOB DEFAULT 'x\"0\"');\nINSERT INTO alltypes VALUES(NULL,'text2','defaultValue',NULL,0,0,NULL,1.5,0,NULL,0,0,NULL,X'0123456789ABCDEF','x\"0\"');\nCOMMIT;"
229229

@@ -242,7 +242,7 @@ func (s *DBRootCommandShellSuite) Test_GivenATableWithRecords_WhenCreateIndexAnd
242242

243243
prefix := "PRAGMA foreign_keys=OFF;\nBEGIN TRANSACTION;\nCREATE TABLE"
244244
if !strings.HasSuffix(s.dbUri, "test.sqlite") {
245-
prefix += " if not exists libsql_wasm_func_table (name text primary key, body text) without rowid;\nCREATE TABLE if not exists"
245+
prefix += " if not exists"
246246
}
247247
expected := " alltypes (textNullable text, textNotNullable text NOT NULL, textWithDefault text DEFAULT 'defaultValue', \n\tintNullable INTEGER, intNotNullable INTEGER NOT NULL, intWithDefault INTEGER DEFAULT '0', \n\tfloatNullable REAL, floatNotNullable REAL NOT NULL, floatWithDefault REAL DEFAULT '0.0', \n\tunknownNullable NUMERIC, unknownNotNullable NUMERIC NOT NULL, unknownWithDefault NUMERIC DEFAULT 0.0, \n\tblobNullable BLOB, blobNotNullable BLOB NOT NULL, blobWithDefault BLOB DEFAULT 'x\"0\"');\nCREATE INDEX idx_textNullable on alltypes (textNullable);\nCREATE INDEX idx_intNotNullable on alltypes (intNotNullable) WHERE intNotNullable > 1;\nCOMMIT;"
248248

@@ -261,7 +261,7 @@ func (s *DBRootCommandShellSuite) Test_GivenATableWithRecordsWithSingleQuote_Whe
261261

262262
prefix := "PRAGMA foreign_keys=OFF;\nBEGIN TRANSACTION;\nCREATE TABLE"
263263
if !strings.HasSuffix(s.dbUri, "test.sqlite") {
264-
prefix += " if not exists libsql_wasm_func_table (name text primary key, body text) without rowid;\nCREATE TABLE if not exists"
264+
prefix += " if not exists"
265265
}
266266
expected := " t (id integer primary key, textfield text, intfield integer);\ninsert into t values(0,'x''x',0);\ncommit;"
267267

@@ -277,7 +277,7 @@ func (s *DBRootCommandShellSuite) Test_GivenATableNameStartingWithNumber_WhenCal
277277

278278
prefix := "PRAGMA foreign_keys=OFF;\nBEGIN TRANSACTION;\nCREATE TABLE"
279279
if !strings.HasSuffix(s.dbUri, "test.sqlite") {
280-
prefix += " if not exists libsql_wasm_func_table (name text primary key, body text) without rowid;\nCREATE TABLE if not exists"
280+
prefix += " if not exists"
281281
}
282282
expected := " \"8test\" (id integer primary key, textfield text, intfield integer);\ninsert into \"8test\" values(1,'value',1);\ncommit;"
283283

@@ -293,7 +293,7 @@ func (s *DBRootCommandShellSuite) Test_GivenATableNameWithSpecialCharacters_When
293293

294294
prefix := "PRAGMA foreign_keys=OFF;\nBEGIN TRANSACTION;\nCREATE TABLE"
295295
if !strings.HasSuffix(s.dbUri, "test.sqlite") {
296-
prefix += " if not exists libsql_wasm_func_table (name text primary key, body text) without rowid;\nCREATE TABLE if not exists"
296+
prefix += " if not exists"
297297
}
298298
expected := " \"t+e(s!t?\" (id integer primary key, textfield text, intfield integer);\ninsert into \"t+e(s!t?\" values(1,'value',1);\ncommit;"
299299

0 commit comments

Comments
 (0)