mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 14:59:41 +02:00
chore(unit-test): simplify teardown EE-5536 (#9015)
This commit is contained in:
parent
b498cd657f
commit
eda07614ce
37 changed files with 110 additions and 218 deletions
|
@ -15,13 +15,15 @@ func (store *Store) GetConnection() portainer.Connection {
|
|||
return store.connection
|
||||
}
|
||||
|
||||
func MustNewTestStore(t testing.TB, init, secure bool) (bool, *Store, func()) {
|
||||
func MustNewTestStore(t testing.TB, init, secure bool) (bool, *Store) {
|
||||
newStore, store, teardown, err := NewTestStore(t, init, secure)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("")
|
||||
}
|
||||
|
||||
return newStore, store, teardown
|
||||
t.Cleanup(teardown)
|
||||
|
||||
return newStore, store
|
||||
}
|
||||
|
||||
func NewTestStore(t testing.TB, init, secure bool) (bool, *Store, func(), error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue