Commit graph

6 commits

Author SHA1 Message Date
Viktor Torstensson
297d203db2
firewalldb: use sqldb/v2 in firewalldb package
Update the firewalldb package to use the `sqldb/v2` package instead of
the older version.
2026-05-14 11:37:50 +02:00
Viktor Tigerström
24ef4201c9
firewalldb: update NewTestDB funcs to return FirewallDBs
In the upcoming migration of the firewall database to SQL, the helper
functions that creates the test databases of different types, need to
return a unified interface in order to not have to control the
migration tests file by build tags. Therefore, we update the
`NewTestDB` functions to return the `FirewallDBs` interface instead of
the specific store implementation type.
2025-07-21 14:45:45 +02:00
Viktor Tigerström
e4f678b635
firewalldb: ensure that test SQL store is closed
We add a helper function to the functions that creates the test SQL
stores, in order to ensure that the store is properly closed when the
test is cleaned up.
2025-07-21 14:45:44 +02:00
Elle Mouton
3f7ae5b6c8
firewalldb: add SQL impl of Actions store
In this commit we let the firewalldb.SQLDB implement the ActionsDB. We
also ensure that all the action unit tests now run against the SQL impl.
2025-05-30 10:56:58 +02:00
Elle Mouton
297313e9c1
firewalldb: add clock.Clock to firewalldb DB impls
In preparation for using the clock to get an Action's AttemptedAt time
in an upcoming commit, we let both the bbolt and SQL impls of the
firewalldb take a clock.
2025-05-13 08:06:16 +02:00
Elle Mouton
ec78618c52
firewalldb: add SQL implementation of RulesDB
In this commit, we let the SQLDB implement the RulesDB interface. Unit
tests are updated such that they can be run against sqlite and postgres
DBs using the SQLDB.
2025-04-15 14:01:00 +02:00