@@ -97,13 +97,17 @@ func (f *BucketFactory) Validate() error {
9797 return f .Spec .ScopeType .CompileFilter ()
9898}
9999
100+ type SimulationChecker interface {
101+ IsSimulated (scenario string ) bool
102+ }
103+
100104func loadBucketFactoriesFromFile (
101105 item * cwhub.Item ,
102106 hub * cwhub.Hub ,
103107 bucketStore * BucketStore ,
104108 response chan pipeline.Event ,
105109 orderEvent bool ,
106- simulationConfig csconfig. SimulationConfig ,
110+ simcheck SimulationChecker ,
107111) ([]BucketFactory , error ) {
108112 itemPath := item .State .LocalPath
109113
@@ -160,8 +164,7 @@ func loadBucketFactoriesFromFile(
160164 f .Filename = filepath .Clean (itemPath )
161165 f .BucketName = seed .Generate ()
162166 f .ret = response
163-
164- f .Simulated = simulationConfig .IsSimulated (f .Spec .Name )
167+ f .Simulated = simcheck .IsSimulated (f .Spec .Name )
165168
166169 f .Spec .ScenarioVersion = item .State .LocalVersion
167170 f .hash = item .State .LocalHash
@@ -192,7 +195,7 @@ func LoadBuckets(
192195 for _ , item := range scenarios {
193196 log .Debugf ("Loading '%s'" , item .State .LocalPath )
194197
195- factories , err := loadBucketFactoriesFromFile (item , hub , bucketStore , response , orderEvent , cscfg .SimulationConfig )
198+ factories , err := loadBucketFactoriesFromFile (item , hub , bucketStore , response , orderEvent , & cscfg .SimulationConfig )
196199 if err != nil {
197200 return nil , nil , err
198201 }
0 commit comments