1
0
mirror of https://github.com/gluster/glusterfs.git synced 2026-02-06 09:48:44 +01:00
Files
glusterfs/tests/basic/fops-sanity.t
Xavi Hernandez d009ce27bf tests: fix duplicated code (#3475)
There were some duplicated functions inside include.rc with identical
code. These have been removed.

There were also two functions with the same name but with different
implementations in include.rc and snapshot.rc. This worked because
some tests did include the files in different order depending on
what they really need.

To address this, the following changes have been applied:

- Moved the function from snapshot.rc to cluster.rc and renamed it.
- Moved the function from include.rc to volume.rc.
- Fixed include order from all scripts.
- Modified scripts that required the renamed function.

Change-Id: I82d220da4e8cd0148d123a49d96ebefbeb7a954c
Updates: #3469
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
2022-05-04 11:44:34 +05:30

29 lines
600 B
Bash
Executable File

#!/bin/bash
. $(dirname $0)/../include.rc
. $(dirname $0)/../volume.rc
cleanup;
TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
TEST $CLI volume create $V0 $H0:$B0/brick1;
EXPECT 'Created' volinfo_field $V0 'Status';
TEST $CLI volume start $V0;
EXPECT 'Started' volinfo_field $V0 'Status';
#mount on a random dir
TEST glusterfs --entry-timeout=3600 --attribute-timeout=3600 -s $H0 --volfile-id=$V0 $M0 --direct-io-mode=yes
build_tester $(dirname $0)/fops-sanity.c
TEST cp $(dirname $0)/fops-sanity $M0
cd $M0
TEST ./fops-sanity $V0
cd -
TEST rm -f $(dirname $0)/fops-sanity
cleanup;