From 035832432dc5bb6899c4600e58ab632683627fd6 Mon Sep 17 00:00:00 2001 From: Ilias Tsitsimpis Date: Mon, 10 Feb 2014 16:22:05 +0200 Subject: [PATCH] burnin: Add QuotasTestSuite --- snf-tools/synnefo_tools/burnin/__init__.py | 2 + .../synnefo_tools/burnin/projects_tests.py | 50 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 snf-tools/synnefo_tools/burnin/projects_tests.py diff --git a/snf-tools/synnefo_tools/burnin/__init__.py b/snf-tools/synnefo_tools/burnin/__init__.py index 4bd02d0d0..698da9e0d 100644 --- a/snf-tools/synnefo_tools/burnin/__init__.py +++ b/snf-tools/synnefo_tools/burnin/__init__.py @@ -47,6 +47,7 @@ from synnefo_tools.burnin.images_tests import \ from synnefo_tools.burnin.pithos_tests import PithosTestSuite from synnefo_tools.burnin.server_tests import ServerTestSuite from synnefo_tools.burnin.network_tests import NetworkTestSuite +from synnefo_tools.burnin.projects_tests import QuotasTestSuite from synnefo_tools.burnin.stale_tests import \ StaleServersTestSuite, StaleFloatingIPsTestSuite, StaleNetworksTestSuite @@ -60,6 +61,7 @@ TESTSUITES = [ PithosTestSuite, ServerTestSuite, NetworkTestSuite, + QuotasTestSuite, ] TSUITES_NAMES = [tsuite.__name__ for tsuite in TESTSUITES] diff --git a/snf-tools/synnefo_tools/burnin/projects_tests.py b/snf-tools/synnefo_tools/burnin/projects_tests.py new file mode 100644 index 000000000..ffa92e8bc --- /dev/null +++ b/snf-tools/synnefo_tools/burnin/projects_tests.py @@ -0,0 +1,50 @@ +# Copyright 2014 GRNET S.A. All rights reserved. +# +# Redistribution and use in source and binary forms, with or +# without modification, are permitted provided that the following +# conditions are met: +# +# 1. Redistributions of source code must retain the above +# copyright notice, this list of conditions and the following +# disclaimer. +# +# 2. Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS +# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and +# documentation are those of the authors and should not be +# interpreted as representing official policies, either expressed +# or implied, of GRNET S.A. + +""" +This is the burnin class that tests the Projects functionality + +""" + +from synnefo_tools.burnin.common import BurninTests, Proper + + +# pylint: disable=too-many-public-methods +class QuotasTestSuite(BurninTests): + """Test Quotas functionality""" + project = Proper(value=None) + + def test_001_check_skip(self): + """Check if we are members in more than one projects""" + self._skip_suite_if(len(self.quotas.keys()) < 2, + "This user is not a member of 2 or more projects") -- GitLab