diff options
author | M S Vishwanath Bhat <msvbhat@gmail.com> | 2016-05-19 18:53:35 +0530 |
---|---|---|
committer | M S Vishwanath Bhat <vbhat@redhat.com> | 2016-05-20 04:31:00 -0700 |
commit | 6837b2793bc3d2cc488aa49491f3f5ff09e925b7 (patch) | |
tree | 7c11fc698fbf668a9f3c635a4927b281929ef132 /tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/quota_ops.py | |
parent | deaf8439fc42435988aae6a7b9ab681cc0d36b09 (diff) |
distaf: Adding GlusterBaseClass to distaflibs-gluster
GlusterBaseClass is the base class for gluster related test cases.
This has setup() method which takes care of creating volumes with
correct volume type after checking global_mode flags etc. So all tests
are recommended to use this base class.
The teardown() method is to teardown the setup that test has created.
Each test case should teardown, any setup it does apart from what is done
in setup().
The cleanup() method is used internally for cleaning up the volumes when
there is a change of volume type between the tests.
This patch also makes relevant import path changes.
The changes from tc.nodes[] to tc.servers[] in distaf-core broke few
tests. This patch fixes them.
Change-Id: I1a8ae20ca7cac13b7d25c587f98c23b430054a57
BUG: 1333738
Signed-off-by: M S Vishwanath Bhat <msvbhat@gmail.com>
Reviewed-on: http://review.gluster.org/14239
Tested-by: M S Vishwanath Bhat <vbhat@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Apeksha D khakharia <akhakhar@redhat.com>
Reviewed-by: Arthy Loganathan <aloganat@redhat.com>
Reviewed-by: ShwethaHPanduranga
Diffstat (limited to 'tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/quota_ops.py')
-rw-r--r-- | tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/quota_ops.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/quota_ops.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/quota_ops.py index fe90b5f359f..ad41c460c47 100644 --- a/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/quota_ops.py +++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/quota_ops.py @@ -26,7 +26,7 @@ def enable_quota(volname, server=''): Returns the output of quota cli command """ if server == '': - server = tc.nodes[0] + server = tc.servers[0] cmd = "gluster volume quota %s enable" % volname return tc.run(server, cmd) @@ -39,6 +39,6 @@ def set_quota_limit(volname, path='/', limit='100GB', server=''): Returs the output of quota limit-usage command """ if server == '': - server = tc.nodes[0] + server = tc.servers[0] cmd = "gluster volume quota %s limit-usage %s %s" % (volname, path, limit) return tc.run(server, cmd) |