mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-27 00:59:07 +02:00
[management] Count the new setting in the Settings round-trip guard
Test_AccountSettings_SaveAndRetrieve asserts how many exported fields types.Settings has, so that adding one forces whoever added it to confirm it survives a save and reload. DebugBundleUploadURL made it 28 and the assertion still said 27. With the count corrected the test populates the new field too and passes on sqlite, postgres and mysql, which is the confirmation the guard exists to get.
This commit is contained in:
@@ -331,7 +331,7 @@ func Test_AccountSettings_SaveAndRetrieve(t *testing.T) {
|
||||
settings := types.Settings{}
|
||||
numOfExportedFields, err := populateFields.PopulateAll(reflect.ValueOf(&settings).Elem())
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 27, numOfExportedFields)
|
||||
assert.Equal(t, 28, numOfExportedFields)
|
||||
account.Settings = &settings
|
||||
|
||||
err = store.SaveAccount(context.Background(), account)
|
||||
|
||||
Reference in New Issue
Block a user