mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests: add a new e2e test case for the combination of non empty CN and grpc proxy
This commit is contained in:
parent
b1afe210e4
commit
a1f964afd3
@ -190,3 +190,34 @@ func TestEtcdPeerCNAuth(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestGrpcproxyAndCommonName(t *testing.T) {
|
||||
argsWithNonEmptyCN := []string{
|
||||
binDir + "/etcd",
|
||||
"grpc-proxy",
|
||||
"start",
|
||||
"--cert", certPath2,
|
||||
"--key", privateKeyPath2,
|
||||
"--cacert", caPath,
|
||||
}
|
||||
|
||||
argsWithEmptyCN := []string{
|
||||
binDir + "/etcd",
|
||||
"grpc-proxy",
|
||||
"start",
|
||||
"--cert", certPath3,
|
||||
"--key", privateKeyPath3,
|
||||
"--cacert", caPath,
|
||||
}
|
||||
|
||||
err := spawnWithExpect(argsWithNonEmptyCN, "cert has non empty Common Name")
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error: %s", err)
|
||||
}
|
||||
|
||||
p, err := spawnCmd(argsWithEmptyCN)
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error: %s", err)
|
||||
}
|
||||
p.Stop()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user