func TestParse_syntax(t *testing.T) {
	var tests = []testRecipe{
		{`
architecture: arm64
actions:
  - action: apt
  - action: debootstrap
  - action: download
  - action: filesystem-deploy
  - action: image-partition
  - action: ostree-commit
  - action: ostree-deploy
  - action: overlay
  - action: pack
  - action: raw
  - action: run
  - action: unpack
  - action: recipe
`,
			"",  
		},
		{`
architecture: arm64
actions:
  - action: test_unknown_action
`,
			"Unknown action: test_unknown_action",
		},
		{`
actions:
  - action: raw
`,
			"Recipe file must have 'architecture' property",
		},
		{`
architecture: arm64
`,
			"Recipe file must have at least one action",
		},
		{`wrong`,
			"yaml: unmarshal errors:\n  line 1: cannot unmarshal !!str `wrong` into actions.Recipe",
		},
		{`
architecture: arm64
`,
			"Recipe file must have at least one action",
		},
	}
	for _, test := range tests {
		runTest(t, test)
	}
}
Check common recipe syntax
package actions_test
import (
	"github.com/go-debos/debos"
	"github.com/go-debos/debos/actions"
	"github.com/stretchr/testify/assert"
	"io/ioutil"
	"os"
	"testing"
	"strings"
)
type testRecipe struct {
	recipe string
	err    string
}
func TestParse_incorrect_file(t *testing.T) {
	var err error
	var tests = []struct {
		filename string
		err      string
	}{
		{
			"non-existing.yaml",
			"open non-existing.yaml: no such file or directory",
		},
		{
			"/proc",
			"read /proc: is a directory",
		},
	}
	for _, test := range tests {
		r := actions.Recipe{}
		err = r.Parse(test.filename, false, false)
		assert.EqualError(t, err, test.err)
	}
}