|
@@ -331,24 +331,29 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() {
|
|
proxyExtraConfig string
|
|
proxyExtraConfig string
|
|
visitorExtraConfig string
|
|
visitorExtraConfig string
|
|
expectError bool
|
|
expectError bool
|
|
- user2 bool
|
|
|
|
|
|
+ deployUser2Client bool
|
|
|
|
+ // skipXTCP is used to skip xtcp test case
|
|
|
|
+ skipXTCP bool
|
|
}{
|
|
}{
|
|
{
|
|
{
|
|
proxyName: "normal",
|
|
proxyName: "normal",
|
|
bindPortName: port.GenName("Normal"),
|
|
bindPortName: port.GenName("Normal"),
|
|
visitorSK: correctSK,
|
|
visitorSK: correctSK,
|
|
|
|
+ skipXTCP: true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
proxyName: "with-encryption",
|
|
proxyName: "with-encryption",
|
|
bindPortName: port.GenName("WithEncryption"),
|
|
bindPortName: port.GenName("WithEncryption"),
|
|
visitorSK: correctSK,
|
|
visitorSK: correctSK,
|
|
commonExtraConfig: "use_encryption = true",
|
|
commonExtraConfig: "use_encryption = true",
|
|
|
|
+ skipXTCP: true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
proxyName: "with-compression",
|
|
proxyName: "with-compression",
|
|
bindPortName: port.GenName("WithCompression"),
|
|
bindPortName: port.GenName("WithCompression"),
|
|
visitorSK: correctSK,
|
|
visitorSK: correctSK,
|
|
commonExtraConfig: "use_compression = true",
|
|
commonExtraConfig: "use_compression = true",
|
|
|
|
+ skipXTCP: true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
proxyName: "with-encryption-and-compression",
|
|
proxyName: "with-encryption-and-compression",
|
|
@@ -371,7 +376,7 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() {
|
|
visitorSK: correctSK,
|
|
visitorSK: correctSK,
|
|
proxyExtraConfig: "allow_users = another, user2",
|
|
proxyExtraConfig: "allow_users = another, user2",
|
|
visitorExtraConfig: "server_user = user1",
|
|
visitorExtraConfig: "server_user = user1",
|
|
- user2: true,
|
|
|
|
|
|
+ deployUser2Client: true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
proxyName: "not-allowed-user",
|
|
proxyName: "not-allowed-user",
|
|
@@ -387,7 +392,7 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() {
|
|
visitorSK: correctSK,
|
|
visitorSK: correctSK,
|
|
proxyExtraConfig: "allow_users = *",
|
|
proxyExtraConfig: "allow_users = *",
|
|
visitorExtraConfig: "server_user = user1",
|
|
visitorExtraConfig: "server_user = user1",
|
|
- user2: true,
|
|
|
|
|
|
+ deployUser2Client: true,
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
|
|
@@ -399,7 +404,7 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() {
|
|
config := getProxyVisitorConf(
|
|
config := getProxyVisitorConf(
|
|
test.proxyName, test.bindPortName, test.visitorSK, test.commonExtraConfig+"\n"+test.visitorExtraConfig,
|
|
test.proxyName, test.bindPortName, test.visitorSK, test.commonExtraConfig+"\n"+test.visitorExtraConfig,
|
|
) + "\n"
|
|
) + "\n"
|
|
- if test.user2 {
|
|
|
|
|
|
+ if test.deployUser2Client {
|
|
clientUser2VisitorConf += config
|
|
clientUser2VisitorConf += config
|
|
} else {
|
|
} else {
|
|
clientVisitorConf += config
|
|
clientVisitorConf += config
|
|
@@ -411,7 +416,10 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() {
|
|
for _, test := range tests {
|
|
for _, test := range tests {
|
|
timeout := time.Second
|
|
timeout := time.Second
|
|
if t == "xtcp" {
|
|
if t == "xtcp" {
|
|
- timeout = 4 * time.Second
|
|
|
|
|
|
+ if test.skipXTCP {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+ timeout = 10 * time.Second
|
|
}
|
|
}
|
|
framework.NewRequestExpect(f).
|
|
framework.NewRequestExpect(f).
|
|
RequestModify(func(r *request.Request) {
|
|
RequestModify(func(r *request.Request) {
|