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
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",
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
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": "",
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",
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:
#
# Copyright (c) 2016-2018 Intra2net AG <info@intra2net.com>
-"""
-.. 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
{"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},