Compare commits

...

3 Commits

Author SHA1 Message Date
danielsagi
3b7c00597f ignore E402 flake8 on test_cloud 2022-05-06 23:53:03 -07:00
danielsagi
52b8887ff6 Moved config initialize to start of test_cloud.py to solve bug in testing 2022-05-06 23:46:46 -07:00
danielsagi
111265e3fb Changed help message of --num-worker-threads flag 2022-05-06 23:39:14 -07:00
2 changed files with 10 additions and 5 deletions

View File

@@ -133,10 +133,13 @@ def parser_add_arguments(parser):
parser.add_argument("--network-timeout", type=float, default=5.0, help="network operations timeout")
parser.add_argument("--num-worker-threads", type=int, default=800,
help="In some environments the default thread count of 800 is too much. "
"This crashes the process when trying to open more threads."
"In that case feel free to try a lower number, like 400 for example.")
parser.add_argument(
"--num-worker-threads",
type=int,
default=800,
help="In some environments the default thread count (800) can cause the process to crash. "
"In the case of a crash try lowering the thread count",
)
def parse_args(add_args_hook):

View File

@@ -1,11 +1,13 @@
# flake8: noqa: E402
import requests_mock
import json
from kube_hunter.conf import Config, set_config
from kube_hunter.core.events.types import NewHostEvent
set_config(Config())
from kube_hunter.core.events.types import NewHostEvent
def test_presetcloud():
"""Testing if it doesn't try to run get_cloud if the cloud type is already set.