get.porter.sh/porter@v1.3.0/pkg/exec/helpers.go (about) 1 package exec 2 3 import ( 4 "testing" 5 6 "get.porter.sh/porter/pkg/runtime" 7 ) 8 9 type TestMixin struct { 10 *Mixin 11 TestConfig runtime.TestRuntimeConfig 12 } 13 14 // NewTestMixin initializes an exec mixin, with the output buffered, and an in-memory file system. 15 func NewTestMixin(t *testing.T) *TestMixin { 16 cfg := runtime.NewTestRuntimeConfig(t) 17 m := New() 18 m.Config = cfg.RuntimeConfig 19 return &TestMixin{ 20 Mixin: m, 21 TestConfig: cfg, 22 } 23 }