diff --git a/pkg/osbuild/script_stage.go b/pkg/osbuild/script_stage.go deleted file mode 100644 index d3c1f5dfc0..0000000000 --- a/pkg/osbuild/script_stage.go +++ /dev/null @@ -1,24 +0,0 @@ -package osbuild - -// The ScriptStageOptions specifies a custom script to run in the image -type ScriptStageOptions struct { - Script string `json:"script"` -} - -func (ScriptStageOptions) isStageOptions() {} - -// NewScriptStageOptions creates a new script stage options object, with -// the mandatory fields set. -func NewScriptStageOptions(script string) *ScriptStageOptions { - return &ScriptStageOptions{ - Script: script, - } -} - -// NewScriptStage creates a new Script Stage object. -func NewScriptStage(options *ScriptStageOptions) *Stage { - return &Stage{ - Type: "org.osbuild.script", - Options: options, - } -} diff --git a/pkg/osbuild/script_stage_test.go b/pkg/osbuild/script_stage_test.go deleted file mode 100644 index b813aff687..0000000000 --- a/pkg/osbuild/script_stage_test.go +++ /dev/null @@ -1,24 +0,0 @@ -package osbuild - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestNewScriptStageOptions(t *testing.T) { - expectedOptions := &ScriptStageOptions{ - Script: "/root/test.sh", - } - actualOptions := NewScriptStageOptions("/root/test.sh") - assert.Equal(t, expectedOptions, actualOptions) -} - -func TestNewScriptStage(t *testing.T) { - expectedStage := &Stage{ - Type: "org.osbuild.script", - Options: &ScriptStageOptions{}, - } - actualStage := NewScriptStage(&ScriptStageOptions{}) - assert.Equal(t, expectedStage, actualStage) -}