def test_create_with_template(self): request = CreateAssemblyProjectRequest() request.name = 'Test' request.target_location = self.tmp_dir request.version = '9.9' request.params['template'] = 'yes' creator = ProjectCreator(request, CreateOptions()) creator.create() project = Project(self.tmp_dir) tester = self.assert_project(project) tester.assert_has_file( os.path.join(ASSEMBLY_DESCRIPTOR_DIR, ASSEMBLY_DESCRIPTOR_YML_FILE), 'description: descriptor for Test') tester.assert_has_file( os.path.join(ASSEMBLY_DESCRIPTOR_DIR, ASSEMBLY_DESCRIPTOR_TEMPLATE_YML_FILE), TEMPLATE_CONTENT) tester.assert_has_directory(os.path.join(ASSEMBLY_BEHAVIOUR_DIR)) tester.assert_has_directory( os.path.join(ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_CONFIGURATIONS_DIR)) tester.assert_has_directory( os.path.join(ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_RUNTIME_DIR)) tester.assert_has_directory( os.path.join(ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_TESTS_DIR)) tester.assert_has_config({ 'schema': '2.0', 'name': 'Test', 'version': '9.9', 'type': 'Assembly', 'packaging': 'tgz' })
def test_create(self): request = CreateResourceProjectRequest() request.name = 'Test' request.target_location = self.tmp_dir request.resource_manager = 'ansiblerm' request.version = '9.9' creator = ProjectCreator(request, CreateOptions()) creator.create() project = Project(self.tmp_dir) tester = self.assert_project(project) tester.assert_has_file(os.path.join(ARM_DESCRIPTOR_DIR, 'Test.yml'), 'description: descriptor for Test') tester.assert_has_directory(ARM_LIFECYCLE_DIR) tester.assert_has_file( os.path.join(ARM_METAINF_DIR, ARM_MANIFEST_FILE), 'resource-manager: ansible') tester.assert_has_directory(ARM_TEST_DIR) tester.assert_has_config({ 'schema': '2.0', 'name': 'Test', 'version': '9.9', 'type': 'Resource', 'packaging': 'tgz', 'resource-manager': 'ansiblerm' })
def test_create_sol003(self): request = CreateResourceProjectRequest() request.name = 'Test' request.version = '9.9' request.target_location = self.tmp_dir request.resource_manager = 'brent2.1' request.params['lifecycle'] = 'sol003' creator = ProjectCreator(request, CreateOptions()) creator.create() project = Project(self.tmp_dir) tester = self.assert_project(project) tester.assert_has_config({ 'schema': '2.0', 'name': 'Test', 'version': '9.9', 'type': 'Resource', 'packaging': 'tgz', 'resource-manager': 'brent2.1' }) tester.assert_has_directory(os.path.join(BRENT_DEFINITIONS_DIR)) inf_dir = os.path.join(BRENT_DEFINITIONS_DIR, BRENT_INFRASTRUCTURE_DIR) tester.assert_has_directory(inf_dir) tester.assert_has_file(os.path.join(inf_dir, 'example.yaml'), EXPECTED_OPENSTACK_EXAMPLE_TOSCA) lm_dir = os.path.join(BRENT_DEFINITIONS_DIR, BRENT_DESCRIPTOR_DIR) tester.assert_has_directory(lm_dir) descriptor_path = os.path.join(lm_dir, BRENT_DESCRIPTOR_YML_FILE) tester.assert_has_file( descriptor_path, EXPECTED_OS_AND_SOL003_DESCRIPTOR.format('Test')) tester.assert_has_directory(os.path.join(BRENT_LIFECYCLE_DIR)) sol003_dir = os.path.join(BRENT_LIFECYCLE_DIR, BRENT_SOL003_DIR) tester.assert_has_directory(sol003_dir) sol003_scripts_dir = os.path.join(sol003_dir, BRENT_SOL003_SCRIPTS_DIR) tester.assert_has_directory(sol003_scripts_dir) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_CREATE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_HEAL_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_INSTANTIATE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_OPERATE_VNF_REQUEST_START_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_OPERATE_VNF_REQUEST_STOP_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_SCALE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_TERMINATE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_VNF_INSTANCE_FILE))
def test_create_defaults(self): request = CreateResourceProjectRequest() request.name = 'Test' request.version = '9.9' request.target_location = self.tmp_dir request.resource_manager = 'brent' creator = ProjectCreator(request, CreateOptions()) creator.create() project = Project(self.tmp_dir) tester = self.assert_project(project) tester.assert_has_config({ 'schema': '2.0', 'name': 'Test', 'version': '9.9', 'packaging': 'tgz', 'type': 'Resource', 'resource-manager': 'brent' }) tester.assert_has_directory(BRENT_DEFINITIONS_DIR) lm_dir = os.path.join(BRENT_DEFINITIONS_DIR, BRENT_DESCRIPTOR_DIR) tester.assert_has_directory(lm_dir) descriptor_path = os.path.join(lm_dir, BRENT_DESCRIPTOR_YML_FILE) tester.assert_has_file( descriptor_path, EXPECTED_OS_AND_ANSIBLE_DESCRIPTOR.format('Test')) tester.assert_has_directory(os.path.join(BRENT_LIFECYCLE_DIR)) openstack_dir = os.path.join(BRENT_LIFECYCLE_DIR, BRENT_OPENSTACK_DIR) tester.assert_has_directory(openstack_dir) openstack_heat_path = os.path.join(openstack_dir, BRENT_OPENSTACK_HEAT_YAML_FILE) tester.assert_has_file(openstack_heat_path, EXPECTED_OPENSTACK_EXAMPLE_HEAT) ansible_dir = os.path.join(BRENT_LIFECYCLE_DIR, BRENT_LIFECYCLE_ANSIBLE_DIR) tester.assert_has_directory(ansible_dir) ansible_scripts_dir = os.path.join( ansible_dir, BRENT_LIFECYCLE_ANSIBLE_SCRIPTS_DIR) tester.assert_has_directory(ansible_scripts_dir) tester.assert_has_file( os.path.join(ansible_scripts_dir, 'Install.yaml'), EXPECTED_ANSIBLE_INSTALL_SCRIPT) ansible_config_dir = os.path.join(ansible_dir, BRENT_LIFECYCLE_ANSIBLE_CONFIG_DIR) tester.assert_has_directory(ansible_config_dir) tester.assert_has_file( os.path.join(ansible_config_dir, BRENT_LIFECYCLE_ANSIBLE_INVENTORY_FILE), EXPECTED_ANSIBLE_INVENTORY) ansible_hostvars_dir = os.path.join( ansible_config_dir, BRENT_LIFECYCLE_ANSIBLE_CONFIG_HOSTVARS_DIR_NAME) tester.assert_has_directory(ansible_hostvars_dir) tester.assert_has_file( os.path.join(ansible_hostvars_dir, 'example-host.yml'), EXPECTED_ANSIBLE_HOST_VARS)
def test_create_csar_packaging(self): request = CreateResourceProjectRequest() request.name = 'Test' request.version = '9.9' request.target_location = self.tmp_dir request.resource_manager = 'brent' request.params['packaging'] = 'csar' creator = ProjectCreator(request, CreateOptions()) creator.create() project = Project(self.tmp_dir) tester = self.assert_project(project) tester.assert_has_config({ 'schema': '2.0', 'name': 'Test', 'version': '9.9', 'packaging': 'csar', 'type': 'Resource', 'resource-manager': 'brent' }) tester.assert_has_directory(PROJECT_TOSCA_META_DIR) tester.assert_has_file( os.path.join(PROJECT_TOSCA_META_DIR, PROJECT_TOSCA_META_FILE), EXPECTED_TOSCA_META)
def test_create_defaults(self): request = CreateTypeProjectRequest() request.name = 'Test' request.target_location = self.tmp_dir creator = ProjectCreator(request, CreateOptions()) creator.create() project = Project(self.tmp_dir) tester = self.assert_project(project) tester.assert_has_file( os.path.join(TYPE_DESCRIPTOR_DIR, TYPE_DESCRIPTOR_YML_FILE), 'description: descriptor for Test') tester.assert_has_directory(os.path.join(ASSEMBLY_BEHAVIOUR_DIR)) tester.assert_has_directory( os.path.join(ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_CONFIGURATIONS_DIR)) tester.assert_has_directory( os.path.join(ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_TESTS_DIR)) tester.assert_has_config({ 'schema': '2.0', 'name': 'Test', 'version': '1.0', 'type': 'Type', 'packaging': 'tgz' })
def test_create_with_subprojects(self): request = CreateResourceProjectRequest() request.name = 'Test' request.target_location = self.tmp_dir request.resource_manager = 'brent' request.version = '9.9' request.params['driver'] = 'sol003' subprojectA_request = ResourceSubprojectRequest() subprojectA_request.name = 'SubA' subprojectA_request.directory = 'SubprojectA' subprojectA_request.resource_manager = 'brent' subprojectA_request.params['driver'] = 'ansible' subprojectA_request.params['inf'] = 'openstack' request.subproject_requests.append(subprojectA_request) subprojectB_request = ResourceSubprojectRequest() subprojectB_request.name = 'SubB' subprojectB_request.directory = 'SubprojectB' subprojectB_request.resource_manager = 'brent' request.subproject_requests.append(subprojectB_request) creator = ProjectCreator(request, CreateOptions()) creator.create() project = Project(self.tmp_dir) tester = self.assert_project(project) tester.assert_has_config({ 'schema': '2.0', 'name': 'Test', 'packaging': 'tgz', 'version': '9.9', 'type': 'Resource', 'resource-manager': 'brent', 'contains': [{ 'name': 'SubA', 'directory': 'SubprojectA', 'type': 'Resource', 'resource-manager': 'brent' }, { 'name': 'SubB', 'directory': 'SubprojectB', 'type': 'Resource', 'resource-manager': 'brent' }] }) tester.assert_has_directory(os.path.join(BRENT_DEFINITIONS_DIR)) lm_dir = os.path.join(BRENT_DEFINITIONS_DIR, BRENT_DESCRIPTOR_DIR) tester.assert_has_directory(lm_dir) descriptor_path = os.path.join(lm_dir, BRENT_DESCRIPTOR_YML_FILE) tester.assert_has_file(descriptor_path, EXPECTED_SOL003_DESCRIPTOR.format('Test')) tester.assert_has_directory(os.path.join(BRENT_LIFECYCLE_DIR)) sol003_dir = os.path.join(BRENT_LIFECYCLE_DIR, BRENT_SOL003_DIR) tester.assert_has_directory(sol003_dir) sol003_scripts_dir = os.path.join(sol003_dir, BRENT_SOL003_SCRIPTS_DIR) tester.assert_has_directory(sol003_scripts_dir) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_CREATE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_HEAL_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_INSTANTIATE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_OPERATE_VNF_REQUEST_START_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_OPERATE_VNF_REQUEST_STOP_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_SCALE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_TERMINATE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_VNF_INSTANCE_FILE)) tester.assert_has_directory(PROJECT_CONTAINS_DIR) subprojectA_path = os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA') tester.assert_has_directory(subprojectA_path) tester.assert_has_directory( os.path.join(subprojectA_path, BRENT_DEFINITIONS_DIR)) lm_dir = os.path.join(subprojectA_path, BRENT_DEFINITIONS_DIR, BRENT_DESCRIPTOR_DIR) tester.assert_has_directory(lm_dir) descriptor_path = os.path.join(lm_dir, BRENT_DESCRIPTOR_YML_FILE) tester.assert_has_file( descriptor_path, EXPECTED_OS_AND_ANSIBLE_DESCRIPTOR.format('SubA')) tester.assert_has_directory( os.path.join(subprojectA_path, BRENT_LIFECYCLE_DIR)) openstack_dir = os.path.join(subprojectA_path, BRENT_LIFECYCLE_DIR, BRENT_OPENSTACK_DIR) tester.assert_has_directory(openstack_dir) openstack_heat_path = os.path.join(openstack_dir, BRENT_OPENSTACK_HEAT_YAML_FILE) tester.assert_has_file(openstack_heat_path, EXPECTED_OPENSTACK_EXAMPLE_HEAT) ansible_dir = os.path.join(subprojectA_path, BRENT_LIFECYCLE_DIR, BRENT_LIFECYCLE_ANSIBLE_DIR) tester.assert_has_directory(ansible_dir) ansible_scripts_dir = os.path.join( ansible_dir, BRENT_LIFECYCLE_ANSIBLE_SCRIPTS_DIR) tester.assert_has_directory(ansible_scripts_dir) tester.assert_has_file( os.path.join(ansible_scripts_dir, 'Install.yaml'), EXPECTED_ANSIBLE_INSTALL_SCRIPT) ansible_config_dir = os.path.join(ansible_dir, BRENT_LIFECYCLE_ANSIBLE_CONFIG_DIR) tester.assert_has_directory(ansible_config_dir) tester.assert_has_file( os.path.join(ansible_config_dir, BRENT_LIFECYCLE_ANSIBLE_INVENTORY_FILE), EXPECTED_ANSIBLE_INVENTORY) ansible_hostvars_dir = os.path.join( ansible_config_dir, BRENT_LIFECYCLE_ANSIBLE_CONFIG_HOSTVARS_DIR_NAME) tester.assert_has_directory(ansible_hostvars_dir) tester.assert_has_file( os.path.join(ansible_hostvars_dir, 'example-host.yml'), EXPECTED_ANSIBLE_HOST_VARS) subprojectB_path = os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB') tester.assert_has_directory(subprojectB_path) tester.assert_has_directory( os.path.join(subprojectB_path, BRENT_DEFINITIONS_DIR)) lm_dir = os.path.join(subprojectB_path, BRENT_DEFINITIONS_DIR, BRENT_DESCRIPTOR_DIR) tester.assert_has_directory(lm_dir) descriptor_path = os.path.join(lm_dir, BRENT_DESCRIPTOR_YML_FILE) tester.assert_has_file(descriptor_path, EXPECTED_SOL003_DESCRIPTOR.format('SubB')) tester.assert_has_directory( os.path.join(subprojectB_path, BRENT_LIFECYCLE_DIR)) sol003_dir = os.path.join(subprojectB_path, BRENT_LIFECYCLE_DIR, BRENT_SOL003_DIR) tester.assert_has_directory(sol003_dir) sol003_scripts_dir = os.path.join(sol003_dir, BRENT_SOL003_SCRIPTS_DIR) tester.assert_has_directory(sol003_scripts_dir) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_CREATE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_HEAL_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_INSTANTIATE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_OPERATE_VNF_REQUEST_START_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_OPERATE_VNF_REQUEST_STOP_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_SCALE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_TERMINATE_VNF_REQUEST_FILE)) tester.assert_has_file_path( os.path.join(sol003_scripts_dir, BRENT_SOL003_VNF_INSTANCE_FILE))
def test_create_with_subprojects(self): request = CreateAssemblyProjectRequest() request.name = 'Test' request.target_location = self.tmp_dir request.version = '9.9' subprojectA_request = AssemblySubprojectRequest() subprojectA_request.name = 'SubA' subprojectA_request.directory = 'SubprojectA' request.subproject_requests.append(subprojectA_request) subprojectB_request = AssemblySubprojectRequest() subprojectB_request.name = 'SubB' subprojectB_request.directory = 'SubprojectB' request.subproject_requests.append(subprojectB_request) creator = ProjectCreator(request, CreateOptions()) creator.create() project = Project(self.tmp_dir) tester = self.assert_project(project) tester.assert_has_file( os.path.join(ASSEMBLY_DESCRIPTOR_DIR, ASSEMBLY_DESCRIPTOR_YML_FILE), 'description: descriptor for Test') tester.assert_has_directory(os.path.join(ASSEMBLY_BEHAVIOUR_DIR)) tester.assert_has_directory( os.path.join(ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_CONFIGURATIONS_DIR)) tester.assert_has_directory( os.path.join(ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_RUNTIME_DIR)) tester.assert_has_directory( os.path.join(ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_TESTS_DIR)) tester.assert_has_config({ 'schema': '2.0', 'name': 'Test', 'version': '9.9', 'type': 'Assembly', 'packaging': 'tgz', 'contains': [{ 'name': 'SubA', 'directory': 'SubprojectA', 'type': 'Assembly' }, { 'name': 'SubB', 'directory': 'SubprojectB', 'type': 'Assembly' }] }) tester.assert_has_directory(PROJECT_CONTAINS_DIR) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA')) tester.assert_has_file( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA', ASSEMBLY_DESCRIPTOR_DIR, ASSEMBLY_DESCRIPTOR_YML_FILE), 'description: descriptor for SubA') tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA', ASSEMBLY_BEHAVIOUR_DIR)) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA', ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_CONFIGURATIONS_DIR)) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA', ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_RUNTIME_DIR)) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA', ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_TESTS_DIR)) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB')) tester.assert_has_file( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB', ASSEMBLY_DESCRIPTOR_DIR, ASSEMBLY_DESCRIPTOR_YML_FILE), 'description: descriptor for SubB') tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB', ASSEMBLY_BEHAVIOUR_DIR)) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB', ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_CONFIGURATIONS_DIR)) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB', ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_RUNTIME_DIR)) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB', ASSEMBLY_BEHAVIOUR_DIR, ASSEMBLY_TESTS_DIR))
def test_create_with_subprojects(self): request = CreateResourceProjectRequest() request.name = 'Test' request.target_location = self.tmp_dir request.resource_manager = 'ansiblerm' request.version = '9.9' subprojectA_request = ResourceSubprojectRequest() subprojectA_request.name = 'SubA' subprojectA_request.directory = 'SubprojectA' subprojectA_request.resource_manager = 'ansiblerm' request.subproject_requests.append(subprojectA_request) subprojectB_request = ResourceSubprojectRequest() subprojectB_request.name = 'SubB' subprojectB_request.directory = 'SubprojectB' subprojectB_request.resource_manager = 'ansiblerm' request.subproject_requests.append(subprojectB_request) creator = ProjectCreator(request, CreateOptions()) creator.create() project = Project(self.tmp_dir) tester = self.assert_project(project) tester.assert_has_file(os.path.join(ARM_DESCRIPTOR_DIR, 'Test.yml'), 'description: descriptor for Test') tester.assert_has_directory(ARM_LIFECYCLE_DIR) tester.assert_has_file( os.path.join(ARM_METAINF_DIR, ARM_MANIFEST_FILE), 'resource-manager: ansible') tester.assert_has_directory(ARM_TEST_DIR) tester.assert_has_config({ 'schema': '2.0', 'name': 'Test', 'version': '9.9', 'type': 'Resource', 'packaging': 'tgz', 'resource-manager': 'ansiblerm', 'contains': [{ 'name': 'SubA', 'directory': 'SubprojectA', 'type': 'Resource', 'resource-manager': 'ansiblerm' }, { 'name': 'SubB', 'directory': 'SubprojectB', 'type': 'Resource', 'resource-manager': 'ansiblerm' }] }) tester.assert_has_directory(PROJECT_CONTAINS_DIR) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA')) tester.assert_has_file( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA', ARM_DESCRIPTOR_DIR, 'SubA.yml'), 'description: descriptor for SubA') tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA', ARM_LIFECYCLE_DIR)) tester.assert_has_file( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA', ARM_METAINF_DIR, ARM_MANIFEST_FILE), 'resource-manager: ansible') tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA', ARM_LIFECYCLE_DIR)) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectA', ARM_TEST_DIR)) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB')) tester.assert_has_file( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB', ARM_DESCRIPTOR_DIR, 'SubB.yml'), 'description: descriptor for SubB') tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB', ARM_LIFECYCLE_DIR)) tester.assert_has_file( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB', ARM_METAINF_DIR, ARM_MANIFEST_FILE), 'resource-manager: ansible') tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB', ARM_LIFECYCLE_DIR)) tester.assert_has_directory( os.path.join(PROJECT_CONTAINS_DIR, 'SubprojectB', ARM_TEST_DIR))