From: Plamen Dimitrov Date: Wed, 5 Feb 2020 00:17:11 +0000 (+0200) Subject: Replace all mentions of autotest with pyi2n-generic alternatives X-Git-Tag: v1.6.4~5 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=bcd9beb1fc1c2d470a5cbca82bc5a0b0ce1c975e;p=pyi2ncommon Replace all mentions of autotest with pyi2n-generic alternatives The only part we keep is using the Autotest email ID used from a custom tool 'test_data_sync' which should be updated on one separate batch. --- diff --git a/src/arnied_wrapper.py b/src/arnied_wrapper.py index 1c29c18..abb3a2b 100644 --- a/src/arnied_wrapper.py +++ b/src/arnied_wrapper.py @@ -781,7 +781,7 @@ def prep_cnf_value(config_file, value, def prep_cnf(config_files, params_dict, regex_dict=None): """ - Update all config files with the most current autotest parameters, + Update all config files with the default overriding parameters, i.e. override the values hard-coded in those config files. :param config_files: config files to use for the configuration diff --git a/src/cnfline/build_intraclient.py b/src/cnfline/build_intraclient.py index 8e0c308..c6accb7 100644 --- a/src/cnfline/build_intraclient.py +++ b/src/cnfline/build_intraclient.py @@ -24,7 +24,7 @@ Create intraclients. from . import build_cnfvar -default_intraclient_name = "autotest-client" +default_intraclient_name = "sample client" default_intraclient_instance = 1 default_cnfvars = { "INTRACLIENT_COMMENT": default_intraclient_name + " comment", diff --git a/src/cnfline/build_key.py b/src/cnfline/build_key.py index 65bcd1c..bf471dc 100644 --- a/src/cnfline/build_key.py +++ b/src/cnfline/build_key.py @@ -23,7 +23,7 @@ from .build_cnfvar import BuildCnfVar class BuildKey(BuildCnfVar): - def __init__(self, data='autotest key', instance=0, line_no=1): + def __init__(self, data='sample key', instance=0, line_no=1): BuildCnfVar.__init__(self, 'KEY_OWN', instance, data, line_no) # set some dummy data for cnf_check diff --git a/src/cnfline/build_provider.py b/src/cnfline/build_provider.py index 83d0378..3dab464 100644 --- a/src/cnfline/build_provider.py +++ b/src/cnfline/build_provider.py @@ -25,7 +25,7 @@ Create provider profiles. from . import build_cnfvar # Defaults are extracted from data/shared_arnied/provider.cnf. -default_provider_name = "autotest_provider" +default_provider_name = "sample_provider" default_provider_instance = 1 default_cnfvars = { "PROVIDER_PROXY_SERVER": "", diff --git a/src/cnfline/build_vpnconn.py b/src/cnfline/build_vpnconn.py index 376e4d1..f7af569 100644 --- a/src/cnfline/build_vpnconn.py +++ b/src/cnfline/build_vpnconn.py @@ -25,7 +25,7 @@ Create vpn connections. from . import build_cnfvar # Defaults are extracted from data/shared_arnied/vpnconn.cnf. -default_vpnconn_name = "autotest_vpn" +default_vpnconn_name = "sample_vpn" default_vpnconn_instance = 1 default_cnfvars = { "VPNCONN_ACTIVATION": "ALWAYS", diff --git a/src/cnfvar.py b/src/cnfvar.py index 44af29f..e0618fc 100644 --- a/src/cnfvar.py +++ b/src/cnfvar.py @@ -795,7 +795,6 @@ def output_json(root, out, renumber=False): probably has to accept `str` (as opposed to `bytes`). :param bool renumber: whether to renumber variables before dupming. """ - # Sanity check incompatible with Autotest. Who needs a seatbelt anyways? # if not isinstance(out, file): #raise TypeError("%s (%s) is not a stream." % (out, type(out))) if renumber is True: diff --git a/test/test_arnied_wrapper.py b/test/test_arnied_wrapper.py index f831887..010fc30 100755 --- a/test/test_arnied_wrapper.py +++ b/test/test_arnied_wrapper.py @@ -20,11 +20,6 @@ # # Copyright (c) 2016-2018 Intra2net AG -""" -.. note:: This unit tests cannot be run as a standalone module from the command line - because it has internal autotest dependencies. It can however be easilty run - from the test suite command line as a "setup" manual step. -""" import unittest import unittest.mock as mock import subprocess @@ -41,7 +36,7 @@ class DummyCmdOutputMapping(object): {"cmd": 'echo "LICENSE_ACCEPTED,0: \\"1\\"" | set_cnf', "stdout": b"", "returncode": 0}, {"cmd": '/usr/intranator/bin/arnied_helper --wait-for-program-end GENERATE', "stdout": b"", "returncode": 0}, - {"cmd": 'get_cnf PROVIDER 1', "stdout": b"PRODIVER 1, 'autotest'", "returncode": 0}, + {"cmd": 'get_cnf PROVIDER 1', "stdout": b"PRODIVER 1, 'sample-provider'", "returncode": 0}, {"cmd": 'tell-connd --online P1', "stdout": b"", "returncode": 0}, {"cmd": "pgrep -l -x arnied", "stdout": b"", "returncode": 0},