hs-test: upload via proxy tests
Type: test Change-Id: Id6b4e2348735081c827f814a814c976b601432ec Signed-off-by: Matus Fabian <matfabia@cisco.com>
This commit is contained in:

committed by
Florin Coras

parent
6e129e3a45
commit
5b175eca2d
@ -6,8 +6,8 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
RegisterVppProxyTests(VppProxyHttpTcpTest, VppProxyHttpTlsTest)
|
||||
RegisterEnvoyProxyTests(EnvoyProxyHttpTcpTest)
|
||||
RegisterVppProxyTests(VppProxyHttpGetTcpTest, VppProxyHttpGetTlsTest, VppProxyHttpPutTcpTest, VppProxyHttpPutTlsTest)
|
||||
RegisterEnvoyProxyTests(EnvoyProxyHttpGetTcpTest, EnvoyProxyHttpPutTcpTest)
|
||||
RegisterNginxProxyTests(NginxMirroringTest)
|
||||
}
|
||||
|
||||
@ -24,25 +24,44 @@ func configureVppProxy(s *VppProxySuite, proto string, proxyPort uint16) {
|
||||
s.Log("proxy configured: " + output)
|
||||
}
|
||||
|
||||
func VppProxyHttpTcpTest(s *VppProxySuite) {
|
||||
func VppProxyHttpGetTcpTest(s *VppProxySuite) {
|
||||
var proxyPort uint16 = 8080
|
||||
configureVppProxy(s, "tcp", proxyPort)
|
||||
uri := fmt.Sprintf("http://%s:%d/httpTestFile", s.VppProxyAddr(), proxyPort)
|
||||
s.CurlDownloadResource(uri)
|
||||
}
|
||||
|
||||
func VppProxyHttpTlsTest(s *VppProxySuite) {
|
||||
func VppProxyHttpGetTlsTest(s *VppProxySuite) {
|
||||
var proxyPort uint16 = 8080
|
||||
configureVppProxy(s, "tls", proxyPort)
|
||||
uri := fmt.Sprintf("https://%s:%d/httpTestFile", s.VppProxyAddr(), proxyPort)
|
||||
s.CurlDownloadResource(uri)
|
||||
}
|
||||
|
||||
func EnvoyProxyHttpTcpTest(s *EnvoyProxySuite) {
|
||||
func VppProxyHttpPutTcpTest(s *VppProxySuite) {
|
||||
var proxyPort uint16 = 8080
|
||||
configureVppProxy(s, "tcp", proxyPort)
|
||||
uri := fmt.Sprintf("http://%s:%d/upload/testFile", s.VppProxyAddr(), proxyPort)
|
||||
s.CurlUploadResource(uri, CurlContainerTestFile)
|
||||
}
|
||||
|
||||
func VppProxyHttpPutTlsTest(s *VppProxySuite) {
|
||||
var proxyPort uint16 = 8080
|
||||
configureVppProxy(s, "tls", proxyPort)
|
||||
uri := fmt.Sprintf("https://%s:%d/upload/testFile", s.VppProxyAddr(), proxyPort)
|
||||
s.CurlUploadResource(uri, CurlContainerTestFile)
|
||||
}
|
||||
|
||||
func EnvoyProxyHttpGetTcpTest(s *EnvoyProxySuite) {
|
||||
uri := fmt.Sprintf("http://%s:%d/httpTestFile", s.ProxyAddr(), s.ProxyPort())
|
||||
s.CurlDownloadResource(uri)
|
||||
}
|
||||
|
||||
func EnvoyProxyHttpPutTcpTest(s *EnvoyProxySuite) {
|
||||
uri := fmt.Sprintf("http://%s:%d/upload/testFile", s.ProxyAddr(), s.ProxyPort())
|
||||
s.CurlUploadResource(uri, CurlContainerTestFile)
|
||||
}
|
||||
|
||||
// broken when CPUS > 1
|
||||
func NginxMirroringTest(s *NginxProxySuite) {
|
||||
s.SkipIfMultiWorker()
|
||||
|
Reference in New Issue
Block a user