agent v0.3.15: mode proxy auto/manuel, correction auto-update et conservation systray, animation UI update
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestHTTPBaseURL(t *testing.T) {
|
||||
cases := []struct {
|
||||
in, want string
|
||||
}{
|
||||
{"wss://studioe5.edudeploy.com/api/websocket", "https://studioe5.edudeploy.com"},
|
||||
{"ws://localhost:3000/api/websocket", "http://localhost:3000"},
|
||||
{"https://studioe5.edudeploy.com/api/websocket", "https://studioe5.edudeploy.com"},
|
||||
{"https://studioe5.edudeploy.com", "https://studioe5.edudeploy.com"},
|
||||
{"wss://example.com/api/websocket/", "https://example.com"},
|
||||
}
|
||||
for _, c := range cases {
|
||||
got := httpBaseURL(c.in)
|
||||
if got != c.want {
|
||||
t.Errorf("httpBaseURL(%q) = %q, want %q", c.in, got, c.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user