1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 12:25:22 +02:00

fix(migration) datastore always marked new and migrations skipped EE-1775 (#5788)

* fix issue with broken store init

* minor logic improvement

* Remove fileexists logic as its redundant and handled implicitely by bolt.Open

* Added re-open test on IsNew flag.  Essential for migrations to be able to run
This commit is contained in:
Matt Hook 2021-10-01 20:35:43 +13:00 committed by GitHub
parent fc4ff59bfd
commit 6bd72d21a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 25 deletions

View file

@ -35,11 +35,7 @@ func NewTestStore(init bool) (*Store, func(), error) {
return nil, nil, err
}
store, err := NewStore(dataStorePath, fileService)
if err != nil {
return nil, nil, err
}
store := NewStore(dataStorePath, fileService)
err = store.Open()
if err != nil {
return nil, nil, err