Exemple #1
0
 def test_only_pods_deployments_services_in_easy_ns(self):
     '''
     For userD user, any operation on pods, deployments and services but only in easy namespace
     Description: Test to validate only userD can perform any operation on pods, deployments and services but only in easy namespace
      Test steps:
             1. Create stackrc_dict for userD
             2. Create the resource expectation list
             3. Perform create and delete operations in default namespace and easy_ns namespace
      Pass criteria: userD must only be able to perform any operation on pods, deployments and services in easy namespace and nothing else
      Maintainer : [email protected]
     '''
     stackrc_dict = {
         'user_name': 'userD',
         'password': '******',
         'project_name': 'userD_project',
         'domain_name': 'userD_domain',
         'auth_url': self.__class__.admin.auth_url
     }
     resource_expectation = {
         'pod': True,
         'deployment': True,
         'service': True,
         'namespace': True
     }
     ResourceUtil.perform_operations(
         resource_expectation=resource_expectation,
         stackrc_dict=stackrc_dict,
         inputs=self.inputs)
     ResourceUtil.perform_operations(
         stackrc_dict=stackrc_dict,
         resource_expectation=resource_expectation,
         namespace='easy',
         inputs=self.inputs)
Exemple #2
0
 def test_only_service_in_zomsrc_ns(self):
     '''
     Description: Test to validate only userC can create and delete service in zomsrc namespace
      Test steps:
             1. Create stackrc_dict for userC
             2. Create the resource expectation list
             3. Perform create and delete operations in default namespace and zomsrc namespace
      Pass criteria: userC must only be able to create and delete service in zomsrc namespace and nothing else
      Maintainer : [email protected]
     '''
     stackrc_dict = {
         'user_name': 'userC',
         'password': '******',
         'project_name': 'userC_project',
         'domain_name': 'userC_domain',
         'auth_url': self.__class__.admin.auth_url
     }
     resource_expectation = {'service': True}
     ResourceUtil.perform_operations(
         stackrc_dict=stackrc_dict,
         resource_expectation=resource_expectation,
         inputs=self.inputs)
     ResourceUtil.perform_operations(
         stackrc_dict=stackrc_dict,
         resource_expectation=resource_expectation,
         namespace='zomsrc',
         inputs=self.inputs)
Exemple #3
0
 def test_only_pods_and_deployments_create(self):
     '''
     Description: Test to validate only userA can create pods and deployments
      Test steps:
             1. Create stackrc_dict for userA
             2. Create the resource expectation list
             3. Perform create and delete operations
      Pass criteria: userA must only be able to create pods and deployments and nothing else
      Maintainer : [email protected]
     '''
     stackrc_dict = {
         'user_name': 'userA',
         'password': '******',
         'project_name': 'userA_project',
         'domain_name': 'userA_domain',
         'auth_url': self.__class__.admin.auth_url
     }
     resource_expectation = {'pod': True, 'deployment': True}
     ResourceUtil.perform_operations(
         stackrc_dict=stackrc_dict,
         resource_expectation=resource_expectation,
         inputs=self.inputs)