跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

basic_test.go

54 行 · 1.4 KB历史下载
1package e2eqemu
2
3import (
4 "github.com/containers/gvisor-tap-vsock/pkg/types"
5 e2e "github.com/containers/gvisor-tap-vsock/test"
6 "github.com/onsi/ginkgo"
7 "github.com/onsi/gomega"
8)
9
10var _ = ginkgo.Describe("connectivity with qemu", func() {
11 e2e.BasicConnectivityTests(e2e.BasicTestProps{
12 SSHExec: sshExec,
13 })
14})
15
16var _ = ginkgo.Describe("dns with qemu", func() {
17 e2e.BasicDNSTests(e2e.BasicTestProps{
18 SSHExec: sshExec,
19 Sock: sock,
20 })
21})
22
23var _ = ginkgo.Describe("dhcp with qemu", func() {
24 e2e.BasicDHCPTests(e2e.BasicTestProps{
25 SSHExec: sshExec,
26 Sock: sock,
27 })
28})
29
30var _ = ginkgo.Describe("command-line format", func() {
31 ginkgo.It("should convert Command to command line format", func() {
32 command := types.NewGvproxyCommand()
33 command.AddEndpoint("unix:///tmp/network.sock")
34 command.AddServiceEndpoint("unix:///tmp/services.sock")
35 command.Debug = true
36 command.AddQemuSocket("tcp://0.0.0.0:1234")
37 command.PidFile = "~/gv-pidfile.txt"
38 command.LogFile = "~/gv.log"
39 command.AddForwardUser("demouser")
40
41 cmd := command.ToCmdline()
42 gomega.Expect(cmd).To(gomega.Equal([]string{
43 "-listen", "unix:///tmp/network.sock",
44 "-services", "unix:///tmp/services.sock",
45 "-debug",
46 "-mtu", "1500",
47 "-ssh-port", "2222",
48 "-listen-qemu", "tcp://0.0.0.0:1234",
49 "-forward-user", "demouser",
50 "-pid-file", "~/gv-pidfile.txt",
51 "-log-file", "~/gv.log",
52 }))
53 })
54})