tests: add a new e2e test case for the combination of non empty CN and grpc proxy
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…
Reference in New Issue