Add cinder_test testcase
[functest.git] / functest / opnfv_tests / openstack / cinder / read_data.sh
1 #!/bin/sh -e
2
3 # Copyright (c) 2018 Enea AB and others
4
5 # This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10
11 VOL_DEV_NAME="$(lsblk -l | grep -Po '^[vs]dc\W')"
12
13 if [ -n "$VOL_DEV_NAME" ]; then
14     sudo mount /dev/$VOL_DEV_NAME /home/cirros/volume;
15     if [ -f /home/cirros/volume/new_data ]; then
16         echo "Found existing data!";
17     else
18         echo "No data found on the volume!";
19         exit 1
20     fi
21 fi