Files
zeekay bd81b9f2e2 canonical: hanzoai imports + hanzo.ai CRD group (de-fission)
Module github.com/fission/fission -> github.com/hanzoai/functions (288 files).
CRD API group fission.io -> hanzo.ai (67 files): functions.hanzo.ai,
environments.hanzo.ai, httptriggers.hanzo.ai, messagequeuetriggers.hanzo.ai,
joining apps.hanzo.ai under the one house group. Doc URLs preserved. Builds green.

Matches the cloud contract: clients/functions, /v1/functions, App CR role
"function". Remaining: fork the env images + the live CRD-group migration
(demo-only today, low risk).
2026-07-19 23:37:32 -07:00

30 lines
740 B
Go

package cli
import (
"bytes"
"context"
"go.uber.org/zap"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/hanzoai/functions/cmd/fission-cli/app"
"github.com/hanzoai/functions/pkg/fission-cli/cmd"
"github.com/hanzoai/functions/test/e2e/framework"
)
func ExecCommand(f *framework.Framework, ctx context.Context, args ...string) (string, error) {
f.Logger().Info("Executing command", zap.Strings("args", args))
cmd := app.App(cmd.ClientOptions{
RestConfig: f.RestConfig(),
Namespace: metav1.NamespaceDefault,
})
cmd.SilenceErrors = true // use our own error message printer
cmd.SetArgs(args)
buf := new(bytes.Buffer)
cmd.SetOut(buf)
cmd.SetErr(buf)
err := cmd.ExecuteContext(ctx)
return buf.String(), err
}