codeista/aw-rpc

unit tests fail in github workflow but work locally

Closed this issue · 2 comments

this is the error

'self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f2f060e3310>
cursor = <sqlite3.Cursor object at 0x7f2f053a33b0>
statement = 'SELECT game.id AS game_id, game.token AS game_token, game.date AS game_date, game.updated AS game_updated, game.board AS game_board \nFROM game \nWHERE game.token = ?\n LIMIT ? OFFSET ?'
parameters = ('wnvZuUHJVM', 1, 0)
context = <sqlalchemy.dialects.sqlite.base.SQLiteExecutionContext object at 0x7f2f04f724c0>

def do_execute(self, cursor, statement, parameters, context=None):
  cursor.execute(statement, parameters)

E sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: game
E [SQL: SELECT game.id AS game_id, game.token AS game_token, game.date AS game_date, game.updated AS game_updated, game.board AS game_board
E FROM game
E WHERE game.token = ?
E LIMIT ? OFFSET ?]
E [parameters: ('wnvZuUHJVM', 1, 0)]
E (Background on this error at: https://sqlalche.me/e/14/e3q8)

/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/sqlalchemy/engine/default.py:732: OperationalError'

if i add the aw-rpc.db to the repo then the tests work ok.

I have created a script to create a db in run the script in the runner. This also fails with a error
"sqlite3.OperationalError: no such table: game"

added tables and columns to the create script