Update read and write data path in cinder test
[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 DEST=$(mktemp -d)
12 VOL_DEV_NAME="$(lsblk -l -o NAME | grep -o "vdc\|sdc\b")"
13 echo "VOL_DEV_NAME: $VOL_DEV_NAME"
14
15 if [ ! -z $VOL_DEV_NAME ]; then
16     sudo mount /dev/$VOL_DEV_NAME $DEST
17     if [ -f $DEST/new_data ]; then
18         echo "Found new data!"
19     else
20         echo "Failed to find data!"
21     exit 1
22     fi
23 fi