def test_all_in_admin_project(self): ''' Description: Test to validate admin user can perform all operations Test steps: 1. Create stackrc_dict for admin user 2. Set the resource expectation list to all k8s resources 3. Perform create and delete operations Pass criteria: admin user must be able to perform all operations successfully Maintainer : [email protected] ''' self.stackrc_dict = ResourceUtil.admin_stackrc() ResourceUtil.create_policy_and_perform_operations( resource_expectation=TestK8sResource.resource_expectation, stackrc_dict=self.stackrc_dict, inputs=self.inputs)
def test_admin_project_with_agent_restart(self): ''' Description: Test to validate normal operations after vrouter agent restart Test steps: 1. Create stackrc_dict for admin user 2. Set the resource expectation list to all k8s resources 3. Perform create and delete operations 4. Restart vrouter agent 5. Perform create and delete operations again Pass criteria: Even after vrouter agent restart, admin user must be able to perform all operations successfully Maintainer : [email protected] ''' stackrc_dict = ResourceUtil.admin_stackrc() ResourceUtil.create_policy_and_perform_operations( resource_expectation=TestRestart.resource_expectation, stackrc_dict=stackrc_dict, inputs=self.inputs) self.restart_vrouter_agent() ResourceUtil.create_policy_and_perform_operations( resource_expectation=TestRestart.resource_expectation, stackrc_dict=stackrc_dict, inputs=self.inputs)