Revision c2f037ff snf-tools/synnefo_tools/burnin/projects_tests.py

b/snf-tools/synnefo_tools/burnin/projects_tests.py
36 36

  
37 37
"""
38 38

  
39
from synnefo_tools.burnin.common import BurninTests, Proper
39
import random
40

  
41
from synnefo_tools.burnin.common import Proper
42
from synnefo_tools.burnin.cyclades_common import CycladesTests
40 43

  
41 44

  
42 45
# pylint: disable=too-many-public-methods
43
class QuotasTestSuite(BurninTests):
46
class QuotasTestSuite(CycladesTests):
44 47
    """Test Quotas functionality"""
45
    project = Proper(value=None)
48
    server = Proper(value=None)
46 49

  
47 50
    def test_001_check_skip(self):
48 51
        """Check if we are members in more than one projects"""
49 52
        self._skip_suite_if(len(self.quotas.keys()) < 2,
50 53
                            "This user is not a member of 2 or more projects")
54

  
55
    def test_002_create(self):
56
        """Create a machine to a different project than base"""
57
        image = random.choice(self._parse_images())
58
        flavors = self._parse_flavors()
59

  
60
        # We want to create our machine in a project other than 'base'
61
        projects = self.quotas.keys()
62
        projects.remove(self._get_uuid())
63
        (flavor, project) = self._find_project(flavors, projects)
64

  
65
        # Create machine
66
        self.server = self._create_server(image, flavor, network=True,
67
                                          project_id=project)
68

  
69
        # Wait for server to become active
70
        self._insist_on_server_transition(
71
            self.server, ["BUILD"], "ACTIVE")

Also available in: Unified diff