only init globals data once
This fixes the issue of global addons not being cleaned up after tests Signed-off-by: Daniel Morsing <dmo@jetstack.io>
This commit is contained in:
parent
e67e4f08ed
commit
f428e0b848
@ -59,10 +59,16 @@ var (
|
||||
provisioned []Addon
|
||||
)
|
||||
|
||||
var globalsInited = false
|
||||
|
||||
// InitGlobals actually allocates the addon values that are defined above.
|
||||
// We do this here so that we can access the suites config structure during
|
||||
// the definition of global addons.
|
||||
func InitGlobals(cfg *config.Config) {
|
||||
if globalsInited {
|
||||
return
|
||||
}
|
||||
globalsInited = true
|
||||
*Base = base.Base{}
|
||||
*Tiller = tiller.Tiller{
|
||||
Base: Base,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user