fix: app logs retrieves recipe
This commit is contained in:
parent
1e4f1b4ade
commit
1e6a6e6174
|
@ -11,6 +11,7 @@ import (
|
|||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
"coopcloud.tech/abra/pkg/client"
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"coopcloud.tech/abra/pkg/recipe"
|
||||
"coopcloud.tech/abra/pkg/service"
|
||||
"coopcloud.tech/abra/pkg/upstream/stack"
|
||||
"github.com/docker/docker/api/types"
|
||||
|
@ -86,6 +87,10 @@ var appLogsCommand = cli.Command{
|
|||
app := internal.ValidateApp(c)
|
||||
stackName := app.StackName()
|
||||
|
||||
if err := recipe.EnsureExists(app.Recipe); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
cl, err := client.New(app.Server)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
|
|
|
@ -32,3 +32,15 @@ setup(){
|
|||
assert_failure
|
||||
assert_output --partial 'is not deployed'
|
||||
}
|
||||
|
||||
@test "retrieve recipe if missing" {
|
||||
run rm -rf "$ABRA_DIR/recipes/$TEST_RECIPE"
|
||||
assert_success
|
||||
assert_not_exists "$ABRA_DIR/recipes/$TEST_RECIPE"
|
||||
|
||||
run $ABRA app logs "$TEST_APP_DOMAIN"
|
||||
assert_failure
|
||||
assert_output --partial 'is not deployed'
|
||||
|
||||
assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue