refactor(recipe): remove remaining usage of old recipe struct

This commit is contained in:
2024-07-08 13:15:20 +02:00
parent c1b03bcbd7
commit 5617a9ba07
24 changed files with 167 additions and 189 deletions

View File

@ -55,8 +55,8 @@ func TestReadEnv(t *testing.T) {
}
func TestReadAbraShEnvVars(t *testing.T) {
offline := true
r, err := recipe.Get("abra-test-recipe", offline)
r := recipe.Get2("abra-test-recipe")
err := r.EnsureExists()
if err != nil {
t.Fatal(err)
}
@ -85,8 +85,8 @@ func TestReadAbraShEnvVars(t *testing.T) {
}
func TestReadAbraShCmdNames(t *testing.T) {
offline := true
r, err := recipe.Get("abra-test-recipe", offline)
r := recipe.Get2("abra-test-recipe")
err := r.EnsureExists()
if err != nil {
t.Fatal(err)
}
@ -110,8 +110,8 @@ func TestReadAbraShCmdNames(t *testing.T) {
}
func TestCheckEnv(t *testing.T) {
offline := true
r, err := recipe.Get("abra-test-recipe", offline)
r := recipe.Get2("abra-test-recipe")
err := r.EnsureExists()
if err != nil {
t.Fatal(err)
}
@ -124,7 +124,7 @@ func TestCheckEnv(t *testing.T) {
app := appPkg.App{
Name: "test-app",
Recipe: r.Name,
Recipe: recipe.Get2(r.Name),
Domain: "example.com",
Env: envSample,
Path: "example.com.env",
@ -144,8 +144,8 @@ func TestCheckEnv(t *testing.T) {
}
func TestCheckEnvError(t *testing.T) {
offline := true
r, err := recipe.Get("abra-test-recipe", offline)
r := recipe.Get2("abra-test-recipe")
err := r.EnsureExists()
if err != nil {
t.Fatal(err)
}
@ -160,7 +160,7 @@ func TestCheckEnvError(t *testing.T) {
app := appPkg.App{
Name: "test-app",
Recipe: r.Name,
Recipe: recipe.Get2(r.Name),
Domain: "example.com",
Env: envSample,
Path: "example.com.env",
@ -180,8 +180,8 @@ func TestCheckEnvError(t *testing.T) {
}
func TestEnvVarCommentsRemoved(t *testing.T) {
offline := true
r, err := recipe.Get("abra-test-recipe", offline)
r := recipe.Get2("abra-test-recipe")
err := r.EnsureExists()
if err != nil {
t.Fatal(err)
}
@ -212,14 +212,13 @@ func TestEnvVarCommentsRemoved(t *testing.T) {
}
func TestEnvVarModifiersIncluded(t *testing.T) {
offline := true
r, err := recipe.Get("abra-test-recipe", offline)
r := recipe.Get2("abra-test-recipe")
err := r.EnsureExists()
if err != nil {
t.Fatal(err)
}
r2 := recipe.Get2(r.Name)
envSample, modifiers, err := envfile.ReadEnvWithModifiers(r2.SampleEnvPath)
envSample, modifiers, err := envfile.ReadEnvWithModifiers(r.SampleEnvPath)
if err != nil {
t.Fatal(err)
}