Skip to content

Commit

Permalink
Merge pull request #409 from untangle/MFW-5396
Browse files Browse the repository at this point in the history
MFW-5396 - added new is_deletable flag for fallback sqlite Database
  • Loading branch information
vishal-malji authored Aug 5, 2024
2 parents 3b457b2 + bfce4f2 commit 21a2768
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions services/settings/database_settings/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ type Database struct {
Type string `json:"type"`
ConnectionString string `json:"db_connection_string"`
Default bool `json:"default"`
IsDeletable bool `json:"is_deletable"`
}
8 changes: 6 additions & 2 deletions services/settings/database_settings/database_settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ func TestDatabaseUnmarshal(t *testing.T) {
"name": "New DB Source",
"type": "DB Type 5",
"default": false,
"db_connection_string": "asdfasdfasdf"
"db_connection_string": "asdfasdfasdf",
"is_deletable":false
}]}`,
expectedErr: false,
expected: Databases{
Expand All @@ -66,6 +67,7 @@ func TestDatabaseUnmarshal(t *testing.T) {
Type: "DB Type 5",
Default: false,
ConnectionString: "asdfasdfasdf",
IsDeletable: false,
},
},
},
Expand All @@ -85,7 +87,8 @@ func TestDatabaseUnmarshal(t *testing.T) {
"id": "66a6bc90-2f5e-4dc3-8180-a7cf4133daf2",
"name": "Local DB",
"type": "sqlite",
"default": true
"default": true,
"is_deletable":false
}]}`,
expectedErr: false,
expected: Databases{
Expand All @@ -103,6 +106,7 @@ func TestDatabaseUnmarshal(t *testing.T) {
Type: "sqlite",
Default: true,
ID: "66a6bc90-2f5e-4dc3-8180-a7cf4133daf2",
IsDeletable: false,
},
},
}},
Expand Down

0 comments on commit 21a2768

Please sign in to comment.