Skip to content

Commit

Permalink
Misc config doc cleanup (#219)
Browse files Browse the repository at this point in the history
* Misc config doc cleanup
I assumed that test_config should also contain all possible values, hence the added value in test_config.py

* added missing ,

* One should also save all the changes before commit...
  • Loading branch information
nsmfoo authored and afeena committed Dec 5, 2017
1 parent acc7e85 commit 0218a0d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
25 changes: 13 additions & 12 deletions docs/source/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ There are 8 different sections :
:user_dorks: Location of user dorks
* **TANNER**

:Host: The host at which Tanner is running
:Port: The port at which Tanner is running
:host: The host at which Tanner is running
:port: The port at which Tanner is running
* **WEB**

:Host: The host at which Tanner Web UI is running
:Port: The port at which Tanner Web UI is running
:host: The host at which Tanner Web UI is running
:port: The port at which Tanner Web UI is running
* **API**

:Host: The host at which Tanner API is running
:Port: The port at which Tanner API is running
:host: The host at which Tanner API is running
:port: The port at which Tanner API is running
* **REDIS**

:Host: The host address at which redis is running
:Post: The port at which which redis is running
:Poolsize: The poolsize of redis server
:host: The host address at which redis is running
:port: The port at which which redis is running
:poolsize: The poolsize of redis server
:timeout: The duration of timeout for redis server
* **EMULATORS**

Expand All @@ -40,7 +40,6 @@ There are 8 different sections :

* **SQLI**

:db_name: THe name of database used in SQLI emulator
:type: Supports two types MySQL/SQLITE
:db_name: The name of database used in SQLI emulator
:host: This will be used for MySQL to get the host address
Expand All @@ -51,7 +50,8 @@ There are 8 different sections :
:host_image: The image which emulates commands in Command Execution Emulator and file system in LFI emulator
* **LOGGER**

:log_file: Location of tanner log file
:log_debug: Location of tanner log file
:log_err: Location of tanner error file
* **MONGO**

:enabled: Check whether MONGO database is enabled
Expand Down Expand Up @@ -85,5 +85,6 @@ If no file is specified, following json will be used as default:
'DOCKER': {'host_image': 'busybox:latest'},
'LOGGER': {'log_file': '/opt/tanner/tanner.log'},
'MONGO': {'enabled': 'False', 'URI': 'mongodb://localhost'},
'LOCALLOG': {'enabled': 'False', 'PATH': '/tmp/tanner_report.json'}
'LOCALLOG': {'enabled': 'False', 'PATH': '/tmp/tanner_report.json'},
'CLEANLOG': {'enabled': 'False'}
}
6 changes: 4 additions & 2 deletions tanner/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def setUp(self):
'DOCKER': {'host_image': 'test_image'},
'LOGGER': {'log_debug': '/opt/tanner/tanner.log', 'log_err': '/opt/tanner/tanner.err'},
'MONGO': {'enabled': 'False', 'URI': 'mongodb://localhost'},
'LOCALLOG': {'enabled': 'False', 'PATH': '/tmp/user_tanner_report.json'}
'LOCALLOG': {'enabled': 'False', 'PATH': '/tmp/user_tanner_report.json'},
'CLEANLOG': {'enabled': 'False'}
}

self.valid_config_path = '/tmp/tanner_config'
Expand Down Expand Up @@ -67,7 +68,8 @@ def test_get_when_file_dont_exists(self):
'DOCKER': {'host_image': 'busybox:latest'},
'LOGGER': {'log_debug': '/opt/tanner/tanner.log', 'log_err': '/opt/tanner/tanner.err'},
'MONGO': {'enabled': 'False', 'URI': 'mongodb://localhost'},
'LOCALLOG': {'enabled': 'False', 'PATH': '/tmp/tanner_report.json'}
'LOCALLOG': {'enabled': 'False', 'PATH': '/tmp/tanner_report.json'},
'CLEANLOG': {'enabled': 'False'}
}

for section in config_template:
Expand Down

0 comments on commit 0218a0d

Please sign in to comment.