@@ -764,7 +764,7 @@ func matchFileSnapshot(ctx context.Context, file string) error {
764764 return snaps .MatchSnapshot (ctx , file , string (content ), status .vars )
765765}
766766
767- func createTrackBundleFile (ctx context.Context , name string , content * godog.DocString ) (context.Context , error ) {
767+ func createGenericFile (ctx context.Context , name string , content * godog.DocString ) (context.Context , error ) {
768768 ctx , _ , vars , err := variables (ctx )
769769 if err != nil {
770770 return ctx , err
@@ -783,6 +783,10 @@ func createTrackBundleFile(ctx context.Context, name string, content *godog.DocS
783783 return ctx , os .WriteFile (file , []byte (data ), 0o600 )
784784}
785785
786+ func createTrackBundleFile (ctx context.Context , name string , content * godog.DocString ) (context.Context , error ) {
787+ return createGenericFile (ctx , name , content )
788+ }
789+
786790// AddStepsTo adds Gherkin steps to the godog ScenarioContext
787791func AddStepsTo (sc * godog.ScenarioContext ) {
788792 sc .Step (`^ec command is run with "(.+)"$` , ecCommandIsRunWith )
@@ -793,6 +797,7 @@ func AddStepsTo(sc *godog.ScenarioContext) {
793797 sc .Step (`^the environment variable is set "([^"]*)"$` , theEnvironmentVarilableIsSet )
794798 sc .Step (`^the output should match the snapshot$` , matchSnapshot )
795799 sc .Step (`^the "([^"]*)" file should match the snapshot$` , matchFileSnapshot )
800+ sc .Step (`^a file named "([^"]*)" containing$` , createGenericFile )
796801 sc .Step (`^a track bundle file named "([^"]*)" containing$` , createTrackBundleFile )
797802 sc .After (func (ctx context.Context , sc * godog.Scenario , err error ) (context.Context , error ) {
798803 logExecution (ctx )
0 commit comments