diff --git a/README.rst b/README.rst index a47ce8b9..891b6b00 100644 --- a/README.rst +++ b/README.rst @@ -217,7 +217,7 @@ file. endpoint=http://localhost:5000 # Set payload and templates path templates= - payloads_dir= + payloads= [user] # @@ -251,7 +251,7 @@ Downloading templates and payloads remotely Payload and template files can be downloaded remotely in syntribos. In the config file under ``[syntribos]`` section, if ``templates`` -and ``payloads_dir`` options are not set then by default syntribos will +and ``payloads`` options are not set then by default syntribos will download templates for a few OpenStack projects and all the latest payloads. As a user you can specify a URI to download custom templates and payloads from as well; this is done by using @@ -294,7 +294,7 @@ necessary fields like user credentials, log, template directory etc. endpoint=http://localhost:5000 # Set payload and templates path templates= - payloads_dir= + payloads= [user] # diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index a69342b8..f0a39050 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -21,7 +21,7 @@ file. endpoint=http://localhost:5000 # Set payload and templates path templates= - payloads_dir= + payloads= [user] # @@ -55,7 +55,7 @@ Downloading templates and payloads remotely Payload and template files can be downloaded remotely in syntribos. In the config file under ``[syntribos]`` section, if ``templates`` -and ``payloads_dir`` options are not set then by default syntribos will +and ``payloads`` options are not set then by default syntribos will download templates for a few OpenStack projects and all the latest payloads. As a user you can specify a URI to download custom templates and payloads from as well; this is done by using @@ -98,7 +98,7 @@ necessary fields like user credentials, log, template directory etc. endpoint=http://localhost:5000 # Set payload and templates path templates= - payloads_dir= + payloads= [user] # diff --git a/doc/source/man/syntribos.rst b/doc/source/man/syntribos.rst index 6304899f..36b4711f 100644 --- a/doc/source/man/syntribos.rst +++ b/doc/source/man/syntribos.rst @@ -12,7 +12,7 @@ syntribos [-h] [--colorize] [--config-dir DIR] [--config-file PATH] [--outfile OUTFILE] [--test-types TEST_TYPES] [--syntribos-endpoint SYNTRIBOS_ENDPOINT] [--syntribos-exclude_results SYNTRIBOS_EXCLUDE_RESULTS] - [--syntribos-payloads_dir SYNTRIBOS_PAYLOADS_DIR] + [--syntribos-payloads SYNTRIBOS_PAYLOADS_DIR] [--syntribos-templates SYNTRIBOS_TEMPLATES] {list_tests,run,dry_run} ... @@ -65,7 +65,7 @@ Main Syntribos Config: The target host to be tested --syntribos-exclude_results SYNTRIBOS_EXCLUDE_RESULTS Defect types to exclude from the results output - --syntribos-payloads_dir SYNTRIBOS_PAYLOADS_DIR + --syntribos-payloads SYNTRIBOS_PAYLOADS_DIR The location where we can find syntribos' payloads --syntribos-templates SYNTRIBOS_TEMPLATES A directory of template files, or a single template diff --git a/examples/configs/keystone.conf b/examples/configs/keystone.conf index 0f55835f..f1397cd7 100644 --- a/examples/configs/keystone.conf +++ b/examples/configs/keystone.conf @@ -4,7 +4,7 @@ endpoint=http://localhost:5000 # Set payload and templates path templates= -payloads_dir= +payloads= [user] # diff --git a/syntribos/config.py b/syntribos/config.py index 062f4068..6bf8d147 100644 --- a/syntribos/config.py +++ b/syntribos/config.py @@ -214,7 +214,7 @@ def list_syntribos_opts(): sample_default="~/.syntribos/templates", help="A directory of template files, or a single template " "file, to test on the target API"), - cfg.StrOpt("payloads_dir", default="", + cfg.StrOpt("payloads", default="", sample_default="~/.syntribos/data", help="The location where we can find syntribos' payloads"), cfg.MultiStrOpt("exclude_results", diff --git a/syntribos/tests/fuzz/base_fuzz.py b/syntribos/tests/fuzz/base_fuzz.py index f2fd7d1f..c1ba80c4 100644 --- a/syntribos/tests/fuzz/base_fuzz.py +++ b/syntribos/tests/fuzz/base_fuzz.py @@ -31,10 +31,10 @@ class BaseFuzzTestCase(base.BaseTestCase): @classmethod def _get_strings(cls, file_name=None): - payloads_dir = CONF.syntribos.payloads_dir - if not payloads_dir: - payloads_dir = remotes.get(CONF.remote.payloads_uri) - path = os.path.join(payloads_dir, file_name or cls.data_key) + payloads = CONF.syntribos.payloads + if not payloads: + payloads = remotes.get(CONF.remote.payloads_uri) + path = os.path.join(payloads, file_name or cls.data_key) with open(path, "rb") as fp: return fp.read().splitlines()