From baa8f2d5f67d45e5761f92cb93fe22050f08d0fe Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Tue, 27 Feb 2018 14:25:49 +0100 Subject: Clean all OpenStack related modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Xtesting is only focused on the framework and entry points. Change-Id: I1a4146ed8519438b13810a20ddf1140c35bb6ecd Signed-off-by: Cédric Ollivier --- functest/tests/unit/vnf/epc/__init__.py | 0 functest/tests/unit/vnf/epc/test_juju_epc.py | 79 ---------------------------- 2 files changed, 79 deletions(-) delete mode 100644 functest/tests/unit/vnf/epc/__init__.py delete mode 100644 functest/tests/unit/vnf/epc/test_juju_epc.py (limited to 'functest/tests/unit/vnf/epc') diff --git a/functest/tests/unit/vnf/epc/__init__.py b/functest/tests/unit/vnf/epc/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/functest/tests/unit/vnf/epc/test_juju_epc.py b/functest/tests/unit/vnf/epc/test_juju_epc.py deleted file mode 100644 index 6b413706..00000000 --- a/functest/tests/unit/vnf/epc/test_juju_epc.py +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2017 Rebaca and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 - -""" Unit test testcase for JuJu EPC Implementation""" - -import logging -import unittest - -import mock - -from functest.opnfv_tests.vnf.epc import juju_epc - - -class JujuEpcTesting(unittest.TestCase): - # pylint: disable=missing-docstring - """Unittest for ABoT EPC with juju orchestrator""" - - def setUp(self): - - self.tenant = 'juju_epc' - self.creds = {'username': 'user', - 'password': 'pwd'} - self.orchestrator = {'name': 'juju', - 'version': '2.0', - 'object': 'foo', - 'requirements': {'flavor': {'name': 'm1.small', - 'ram_min': 2048}, - 'pip': 'python3-pip', - 'repo_link': 'ppa:juju/stable', - 'dep_package': 'software-' - 'properties' - '-common', - 'pip3_packages': 'juju-wait'}} - self.vnf = {'name': 'juju_epc', - 'descriptor': {'version': '1', - 'file_name': '/src/epc-test/' - 'abot_charm/' - 'functest-abot-' - 'epc-bundle/bundle.yaml', - 'name': 'abot-oai-epc', - 'requirements': {'flavor': - {'name': 'm1.medium', - 'ram_min': 4096}}}} - with mock.patch('functest.opnfv_tests.vnf.epc.juju_epc.os.makedirs'), \ - mock.patch('functest.opnfv_tests.vnf.epc.juju_epc.get_config', - return_value={'tenant_images': 'foo', - 'orchestrator': self.orchestrator, - 'vnf': self.vnf, 'vnf_test_suite': '', - 'version': 'whatever'}): - self.epc_vnf = juju_epc.JujuEpc() - - self.images = {'image1': 'url1', - 'image2': 'url2'} - self.details = {'orchestrator': {'status': 'PASS', 'duration': 120}, - 'vnf': {}, - 'test_vnf': {}} - - @unittest.skip("It must be fixed. Please see JIRA FUNCTEST-915") - @mock.patch('snaps.openstack.create_image.OpenStackImage.create') - @mock.patch('os.system') - def test_prepare_default(self, *args): - """ Unittest for Prepare testcase """ - self.epc_vnf.orchestrator = self.orchestrator - self.assertIsNone(self.epc_vnf.prepare()) - args[4].assert_called_once_with('test', - 'debayan', - 'OAI EPC deployed ' - 'with Juju') - - -if __name__ == "__main__": - logging.disable(logging.CRITICAL) - unittest.main(verbosity=2) -- cgit 1.2.3-korg