feat: fix proxy compatibility and establish TUI foundation
This commit is contained in:
@@ -562,6 +562,25 @@ func TestDockerDaemonRestartFailureIsRedactedTruthfulAndRetryable(t *testing.T)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDockerDaemonAcceptsCompleteHTTPProfileWithAdditionalSOCKSProxy(t *testing.T) {
|
||||
a, record, daemonPath, _, _ := fixture(t)
|
||||
p := &profile.Profile{
|
||||
Name: "dual", Mode: profile.AdvancedMode,
|
||||
HTTPURL: "http://localhost:7890", HTTPSURL: "http://localhost:7890", AllURL: "socks5://localhost:7890",
|
||||
}
|
||||
result := a.SetDesired(context.Background(), true, p)
|
||||
if result.Err != nil || result.Inspection.State != target.Enabled {
|
||||
t.Fatalf("dual-protocol result = %#v events=%v", result, record.events)
|
||||
}
|
||||
data, err := os.ReadFile(daemonPath)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !strings.Contains(string(data), `"http-proxy": "http://localhost:7890"`) || !strings.Contains(string(data), `"https-proxy": "http://localhost:7890"`) {
|
||||
t.Fatalf("daemon config = %s", data)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDockerDaemonRejectsIncompatibleProfileBeforeMutation(t *testing.T) {
|
||||
for _, p := range []*profile.Profile{
|
||||
{Name: "socks", Mode: profile.SingleMode, SingleURL: "socks5://proxy.example:1080"},
|
||||
|
||||
Reference in New Issue
Block a user