support virtualservice multi port

Signed-off-by: zackzhangkai <zhangkaiamm@gmail.com>
This commit is contained in:
zackzhangkai
2021-03-08 22:44:19 +08:00
parent 6f719e0af6
commit 676062d760
4 changed files with 222 additions and 58 deletions

View File

@@ -0,0 +1,21 @@
package servicemesh
import "testing"
func TestIsHTTP(t *testing.T) {
if !SupportHttpProtocol("gRPC") {
t.Errorf("gRPC is HTTP protocol")
}
if !SupportHttpProtocol("HTTP") {
t.Errorf("HTTP is HTTP protocol")
}
if !SupportHttpProtocol("HTTP2") {
t.Errorf("HTTP2 is HTTP protocol")
}
if SupportHttpProtocol("Mysql") {
t.Errorf("mysql is not HTTP protocol")
}
if SupportHttpProtocol("udp") {
t.Errorf("UDP is not HTTP protocol")
}
}