Files
larksuite__cli/internal/runtimebootstrap/bootstrap_test.go
zhaoyukun.yk 4dfe1b7dc0 feat(auth): support managed external credentials
Add Extended-only direct, credential-proxy, and platform-proxy modes while keeping Standard behavior and external-credential product details isolated behind source-neutral runtime capabilities.

Fail closed across helper execution, proxy routing, streams, managed file transfers, and unsupported event flows. Harden system configuration, edition updates, and release publication.

Cover Standard compatibility and Extended integration with contract tests, repository-local three-mode E2E, native trust checks, and CI and release gates.
2026-08-12 14:55:41 +08:00

25 lines
634 B
Go

// Copyright (c) 2026 Lark Technologies Pte. Ltd.
// SPDX-License-Identifier: MIT
package runtimebootstrap
import (
"testing"
"github.com/larksuite/cli/internal/core"
)
func TestResolveEstablishesWorkspaceBeforeReadingProfile(t *testing.T) {
t.Setenv("LARKSUITE_CLI_CONFIG_DIR", t.TempDir())
t.Setenv("OPENCLAW_CLI", "1")
core.SetCurrentWorkspace(core.WorkspaceLocal)
result := Resolve("")
if result == nil || result.Plan == nil {
t.Fatal("Resolve() returned no runtime plan")
}
if got := core.CurrentWorkspace(); got != core.WorkspaceOpenClaw {
t.Fatalf("workspace = %q, want %q", got, core.WorkspaceOpenClaw)
}
}