mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests: Allow specifying http version in curl
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
ae30e5c2fb
commit
cbf819740e
@ -36,6 +36,7 @@ type CURLReq struct {
|
||||
Header string
|
||||
|
||||
Ciphers string
|
||||
HttpVersion string
|
||||
}
|
||||
|
||||
func (r CURLReq) timeoutDuration() time.Duration {
|
||||
@ -57,6 +58,9 @@ func CURLPrefixArgs(clientURL string, cfg ClientConfig, CN bool, method string,
|
||||
var (
|
||||
cmdArgs = []string{"curl"}
|
||||
)
|
||||
if req.HttpVersion != "" {
|
||||
cmdArgs = append(cmdArgs, "--http"+req.HttpVersion)
|
||||
}
|
||||
if req.IsTLS {
|
||||
if cfg.ConnectionType != ClientTLSAndNonTLS {
|
||||
panic("should not use cURLPrefixArgsUseTLS when serving only TLS or non-TLS")
|
||||
|
Loading…
x
Reference in New Issue
Block a user