diff options
author | Ashish Pandey <aspandey@redhat.com> | 2016-08-19 14:13:51 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2016-08-21 21:03:43 -0700 |
commit | fad93c16a3fc52171f3f2b024baa5bc8b8749bee (patch) | |
tree | 3fb07aec217d9ab69c06a11b350b2a0bfbae3acb /tests/bugs/cli | |
parent | e9573be8fda72092338074687ef71c9b5086b6c8 (diff) |
tests/cli: Generate SSL certificates
Generate SSL certificates before enabling
management encryption to avoid test failure.
Change-Id: Iab23b36703f4653f1d5bb9d14695e4d3fa63ad61
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
BUG: 1368349
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Reviewed-on: http://review.gluster.org/15202
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'tests/bugs/cli')
-rwxr-xr-x | tests/bugs/cli/bug-1320388.t | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/bugs/cli/bug-1320388.t b/tests/bugs/cli/bug-1320388.t index 71e74a2c1a3..f6ea3d6c882 100755 --- a/tests/bugs/cli/bug-1320388.t +++ b/tests/bugs/cli/bug-1320388.t @@ -6,8 +6,25 @@ # This test enables management ssl and then test the # heal info command. +for d in /etc/ssl /etc/openssl /usr/local/etc/openssl ; do + if test -d $d ; then + SSL_BASE=$d + break + fi +done + +SSL_KEY=$SSL_BASE/glusterfs.key +SSL_CERT=$SSL_BASE/glusterfs.pem +SSL_CA=$SSL_BASE/glusterfs.ca + cleanup; +rm -f $SSL_BASE/glusterfs.* touch /var/lib/glusterd/secure-access + +TEST openssl genrsa -out $SSL_KEY 1024 +TEST openssl req -new -x509 -key $SSL_KEY -subj /CN=Anyone -out $SSL_CERT +ln $SSL_CERT $SSL_CA + TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 disperse 6 redundancy 2 $H0:$B0/${V0}{0..5} |