func newExporter(config environment.GlobalConfig, providerName string) *exporter.Exporter { exporterConfig := exporter.Config{ HelperDir: config.HelperDir, TargetDir: config.TargetDirFor(providerName), User: config.RunUser, Group: config.RunGroup, DefaultWorkingDirectory: config.WorkingDirectory, } provider := newProvider(providerName) return exporter.New(exporterConfig, provider) }
func (env *TestEnv) NewExporter(config exporter.Config, provider exporter.Provider) *exporter.Exporter { sys := exporter.New(config, provider) sys.Fs = env.fs return sys }