forked from toolshed/abra
refactor(recipe): rename Recipe2 -> Recipe
This commit is contained in:
@ -84,7 +84,7 @@ func GetApps(appFiles AppFiles, recipeFilter string) ([]App, error) {
|
||||
// App reprents an app with its env file read into memory
|
||||
type App struct {
|
||||
Name AppName
|
||||
Recipe recipe.Recipe2
|
||||
Recipe recipe.Recipe
|
||||
Domain string
|
||||
Env envfile.AppEnv
|
||||
Server string
|
||||
@ -260,7 +260,7 @@ func NewApp(env envfile.AppEnv, name string, appFile AppFile) (App, error) {
|
||||
return App{
|
||||
Name: name,
|
||||
Domain: domain,
|
||||
Recipe: recipe.Get2(recipeName),
|
||||
Recipe: recipe.Get(recipeName),
|
||||
Env: env,
|
||||
Server: appFile.Server,
|
||||
Path: appFile.Path,
|
||||
@ -358,7 +358,7 @@ func GetAppNames() ([]string, error) {
|
||||
|
||||
// TemplateAppEnvSample copies the example env file for the app into the users
|
||||
// env files.
|
||||
func TemplateAppEnvSample(r recipe.Recipe2, appName, server, domain string) error {
|
||||
func TemplateAppEnvSample(r recipe.Recipe, appName, server, domain string) error {
|
||||
envSample, err := os.ReadFile(r.SampleEnvPath)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -47,7 +47,7 @@ func TestGetApp(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetComposeFiles(t *testing.T) {
|
||||
r := recipe.Get2("abra-test-recipe")
|
||||
r := recipe.Get("abra-test-recipe")
|
||||
err := r.EnsureExists()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -85,7 +85,7 @@ func TestGetComposeFiles(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
r2 := recipe.Get2(r.Name)
|
||||
r2 := recipe.Get(r.Name)
|
||||
composeFiles, err := r2.GetComposeFiles(test.appEnv)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -95,7 +95,7 @@ func TestGetComposeFiles(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetComposeFilesError(t *testing.T) {
|
||||
r := recipe.Get2("abra-test-recipe")
|
||||
r := recipe.Get("abra-test-recipe")
|
||||
err := r.EnsureExists()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -107,7 +107,7 @@ func TestGetComposeFilesError(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
r2 := recipe.Get2(r.Name)
|
||||
r2 := recipe.Get(r.Name)
|
||||
_, err := r2.GetComposeFiles(test.appEnv)
|
||||
if err == nil {
|
||||
t.Fatalf("should have failed: %v", test.appEnv)
|
||||
|
Reference in New Issue
Block a user