Exemple #1
0
    def setUpClass(cls):
        # one-time setup for ISA config which doesn't change between testcases
        cls.isafw_conf = isafw.ISA_config()
        cls.isafw_conf.timestamp = TIMESTAMP

        if "https_proxy" in os.environ:
            cls.isafw_conf.proxy = os.environ['https_proxy']
        elif "http_proxy" in os.environ:
            cls.isafw_conf.proxy = os.environ['http_proxy']

        cls.isafw_conf.full_reports = True
Exemple #2
0
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE

import unittest
import sys
from isafw import isafw
import isaplugins
import shutil
import os
import filecmp
from datetime import datetime

kernel_conf = "./kca_plugin/data/config"
ref_kca_full_output = "./kca_plugin/data/ref_kca_full_report_TestImage"
ref_kca_problems_output = "./kca_plugin/data/ref_kca_problems_report_TestImage"
isafw_conf = isafw.ISA_config()
isafw_conf.reportdir = "./kca_plugin/output"

class TestKCAPlugin(unittest.TestCase):

    def setUp(self):
        # cleaning up the report dir and creating it if needed
        if os.path.exists(os.path.dirname(isafw_conf.reportdir+"/internal/test")):
            shutil.rmtree(isafw_conf.reportdir)
        os.makedirs(os.path.dirname(isafw_conf.reportdir+"/internal/test"))
        # setting the timestamp
        isafw_conf.timestamp = datetime.now().strftime('%Y%m%d%H%M%S')
        # fetching proxy info
        isafw_conf.proxy = ""
        if "http_proxy" in os.environ:
            isafw_conf.proxy = os.environ['http_proxy']