@@ -75,7 +75,7 @@ func TestFirewallDBMigration(t *testing.T) {
75
75
// The assertMigrationResults function will currently assert that
76
76
// the migrated kv stores entries in the SQLDB match the original kv
77
77
// stores entries in the BoltDB.
78
- assertMigrationResults := func (t * testing.T , sqlStore * SQLDB ,
78
+ assertMigrationResults := func (t * testing.T , store * SQLDB ,
79
79
kvEntries []* kvEntry ) {
80
80
81
81
var (
@@ -88,7 +88,7 @@ func TestFirewallDBMigration(t *testing.T) {
88
88
getRuleID := func (ruleName string ) int64 {
89
89
ruleID , ok := ruleIDs [ruleName ]
90
90
if ! ok {
91
- ruleID , err = sqlStore .GetRuleID (ctx , ruleName )
91
+ ruleID , err = store .GetRuleID (ctx , ruleName )
92
92
require .NoError (t , err )
93
93
94
94
ruleIDs [ruleName ] = ruleID
@@ -100,7 +100,7 @@ func TestFirewallDBMigration(t *testing.T) {
100
100
getGroupID := func (groupAlias []byte ) int64 {
101
101
groupID , ok := groupIDs [string (groupAlias )]
102
102
if ! ok {
103
- groupID , err = sqlStore .GetSessionIDByAlias (
103
+ groupID , err = store .GetSessionIDByAlias (
104
104
ctx , groupAlias ,
105
105
)
106
106
require .NoError (t , err )
@@ -114,7 +114,7 @@ func TestFirewallDBMigration(t *testing.T) {
114
114
getFeatureID := func (featureName string ) int64 {
115
115
featureID , ok := featureIDs [featureName ]
116
116
if ! ok {
117
- featureID , err = sqlStore .GetFeatureID (
117
+ featureID , err = store .GetFeatureID (
118
118
ctx , featureName ,
119
119
)
120
120
require .NoError (t , err )
@@ -128,7 +128,7 @@ func TestFirewallDBMigration(t *testing.T) {
128
128
// First we extract all migrated kv entries from the SQLDB,
129
129
// in order to be able to compare them to the original kv
130
130
// entries, to ensure that the migration was successful.
131
- sqlKvEntries , err := sqlStore .ListAllKVStoresRecords (ctx )
131
+ sqlKvEntries , err := store .ListAllKVStoresRecords (ctx )
132
132
require .NoError (t , err )
133
133
require .Equal (t , len (kvEntries ), len (sqlKvEntries ))
134
134
@@ -144,7 +144,7 @@ func TestFirewallDBMigration(t *testing.T) {
144
144
ruleID := getRuleID (entry .ruleName )
145
145
146
146
if entry .groupAlias .IsNone () {
147
- sqlVal , err := sqlStore .GetGlobalKVStoreRecord (
147
+ sqlVal , err := store .GetGlobalKVStoreRecord (
148
148
ctx ,
149
149
sqlc.GetGlobalKVStoreRecordParams {
150
150
Key : entry .key ,
@@ -162,7 +162,7 @@ func TestFirewallDBMigration(t *testing.T) {
162
162
groupAlias := entry .groupAlias .UnwrapOrFail (t )
163
163
groupID := getGroupID (groupAlias [:])
164
164
165
- v , err := sqlStore .GetGroupKVStoreRecord (
165
+ v , err := store .GetGroupKVStoreRecord (
166
166
ctx ,
167
167
sqlc.GetGroupKVStoreRecordParams {
168
168
Key : entry .key ,
@@ -187,7 +187,7 @@ func TestFirewallDBMigration(t *testing.T) {
187
187
entry .featureName .UnwrapOrFail (t ),
188
188
)
189
189
190
- sqlVal , err := sqlStore .GetFeatureKVStoreRecord (
190
+ sqlVal , err := store .GetFeatureKVStoreRecord (
191
191
ctx ,
192
192
sqlc.GetFeatureKVStoreRecordParams {
193
193
Key : entry .key ,
0 commit comments