feat: add deployment foundation and cross-device handoff
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestPreflightDoesNotAuthorizeInstallation(t *testing.T) {
|
||||
code, out, diagnostics := run([]string{"preflight"}, "")
|
||||
var response struct {
|
||||
ProtocolVersion int `json:"protocolVersion"`
|
||||
Mode string `json:"mode"`
|
||||
Proposal struct {
|
||||
Executable bool `json:"executable"`
|
||||
Blockers []string `json:"blockers"`
|
||||
} `json:"proposal"`
|
||||
}
|
||||
if code != 0 || json.Unmarshal([]byte(out), &response) != nil || response.ProtocolVersion != 1 || response.Mode != "local-environment-proposal" || response.Proposal.Executable || len(response.Proposal.Blockers) == 0 {
|
||||
t.Fatalf("unsafe report: %s %s", out, diagnostics)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user