forked from toolshed/abra
test: moar integration tests [ci skip]
This commit is contained in:
@ -5,7 +5,6 @@ import (
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
recipePkg "coopcloud.tech/abra/pkg/recipe"
|
||||
"coopcloud.tech/abra/pkg/runtime"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
@ -18,23 +17,19 @@ var recipeVersionCommand = cli.Command{
|
||||
Flags: []cli.Flag{
|
||||
internal.DebugFlag,
|
||||
internal.OfflineFlag,
|
||||
internal.NoInputFlag,
|
||||
},
|
||||
Before: internal.SubCommandBefore,
|
||||
BashComplete: autocomplete.RecipeNameComplete,
|
||||
Action: func(c *cli.Context) error {
|
||||
conf := runtime.New(
|
||||
runtime.WithOffline(internal.Offline),
|
||||
runtime.WithEnsureRecipeUpToDate(false),
|
||||
)
|
||||
recipe := internal.ValidateRecipe(c)
|
||||
|
||||
recipe := internal.ValidateRecipe(c, conf)
|
||||
|
||||
catalogue, err := recipePkg.ReadRecipeCatalogue(conf)
|
||||
catl, err := recipePkg.ReadRecipeCatalogue(internal.Offline)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
recipeMeta, ok := catalogue[recipe.Name]
|
||||
recipeMeta, ok := catl[recipe.Name]
|
||||
if !ok {
|
||||
logrus.Fatalf("%s recipe doesn't exist?", recipe.Name)
|
||||
}
|
||||
|
Reference in New Issue
Block a user