Add support for Connectors #280
22 errors, 57 fail, 1 skipped, 77 pass in 44s
Annotations
Check warning on line 0 in tests.test_action
github-actions / Test Results
test_validate_results_none (tests.test_action) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_validate_results_none():
> action = DummyAction()
tests/test_action.py:169:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/action.py:53: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aee507bd0>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_action
github-actions / Test Results
test_action_json_argument (tests.test_action) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
storage = PosixPath('/tmp/tmpftcnqhe5')
def test_action_json_argument(storage):
> action = DummyAction(data_path=storage)
tests/test_action.py:198:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/action.py:53: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aeddfa0d0>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_action
github-actions / Test Results
test_action_json_argument_missing (tests.test_action) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_action_json_argument_missing():
> action = DummyAction()
tests/test_action.py:211:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/action.py:53: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aed92ec10>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_action
github-actions / Test Results
test_action_json_result (tests.test_action) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
storage = PosixPath('/tmp/tmp9b5mkhi9')
def test_action_json_result(storage):
> action = DummyAction(data_path=storage)
tests/test_action.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/action.py:53: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aeddfcf50>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_action
github-actions / Test Results
test_action_json_result_same_as_argument (tests.test_action) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_action_json_result_same_as_argument():
> action = DummyAction()
tests/test_action.py:234:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/action.py:53: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aef1da690>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_action
github-actions / Test Results
test_generic_api_action (tests.test_action) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
storage = PosixPath('/tmp/tmp0zxjgawe')
def test_generic_api_action(storage):
def init_action():
action = GenericAPIAction(data_path=storage)
action.verb = "get"
action.endpoint = "resource/{uuid}/count"
action.query_parameters = ["param"]
action.module.configuration = {"base_url": "http://base_url/"}
action._wait_param = lambda: wait_none()
return action
# success
> action = init_action()
tests/test_action.py:253:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_action.py:244: in init_action
action = GenericAPIAction(data_path=storage)
sekoia_automation/action.py:53: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aeddd9910>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_action
github-actions / Test Results
test_action_with_arguments_model (tests.test_action) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_action_with_arguments_model():
class TestActionArguments(BaseModel):
field: str = "value"
number: int = 0
class TestAction(Action):
def run(self, arguments: TestActionArguments):
return arguments
> action = TestAction()
tests/test_action.py:367:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/action.py:53: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aeed48b50>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_action
github-actions / Test Results
test_action_with_results_model (tests.test_action) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_action_with_results_model():
class TestActionResults(BaseModel):
field: str = "value"
number: int = 0
class TestAction(Action):
results_model = TestActionResults
def run(self, arguments: dict):
return arguments
> action = TestAction()
tests/test_action.py:393:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/action.py:53: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aed974790>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_action
github-actions / Test Results
test_add_secrets_dict (tests.test_action) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
_ = <PropertyMock name='token' id='139753627562640'>
__ = <MagicMock name='has_secrets' id='139753627562896'>
kwargs = {'m': <requests_mock.mocker.Mocker object at 0x7f1aed527bd0>}
callback_url = 'https://mock.callback', secret_key = 'foo'
secrets = {'foo': 'bar'}
@patch.object(Module, "has_secrets", return_value=True)
@patch.object(Action, "token", return_value="", new_callable=PropertyMock)
@requests_mock.Mocker(kw="m")
def test_add_secrets_dict(_, __, **kwargs):
callback_url = "https://mock.callback"
secret_key = "foo"
secrets = {secret_key: "bar"}
kwargs["m"].register_uri(
"PATCH",
callback_url,
status_code=200,
json={"module_configuration": {"value": secrets}},
)
> action = DummyAction()
tests/test_action.py:451:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/action.py:53: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aed9f9850>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_action
github-actions / Test Results
test_add_secrets_object (tests.test_action) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
_ = <PropertyMock name='token' id='139753623810896'>
__ = <MagicMock name='has_secrets' id='139753628352464'>
kwargs = {'m': <requests_mock.mocker.Mocker object at 0x7f1aed1a7610>}
callback_url = 'https://mock.callback', secret_key = 'foo'
secrets = {'foo': 'bar'}
@patch.object(Module, "has_secrets", return_value=True)
@patch.object(Action, "token", return_value="", new_callable=PropertyMock)
@requests_mock.Mocker(kw="m")
def test_add_secrets_object(_, __, **kwargs):
callback_url = "https://mock.callback"
secret_key = "foo"
secrets = {secret_key: "bar"}
kwargs["m"].register_uri(
"PATCH",
callback_url,
status_code=200,
json={"module_configuration": {"value": secrets}},
)
> action = DummyAction()
tests/test_action.py:480:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/action.py:53: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aed16a210>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_load_config_file_not_exists (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_load_config_file_not_exists():
> module = Module()
tests/test_module.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aec5651d0>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_command_no_arg (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_command_no_arg():
> module = Module()
tests/test_module.py:32:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aeb54a090>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_command (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_command():
> module = Module()
tests/test_module.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aeb54b710>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_no_command (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_no_command():
> module = Module()
tests/test_module.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aec92b710>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_register_no_command (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_register_no_command():
> module = Module()
tests/test_module.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aec52e210>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_register_execute_default (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
mock = <MagicMock name='execute' id='139753607178256'>
@patch.object(DummyTrigger, "execute")
def test_register_execute_default(mock):
> module = Module()
tests/test_module.py:67:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aed166b90>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_register_execute_command (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
mock = <MagicMock name='execute' id='139753619466192'>
@patch.object(DummyTrigger, "execute")
def test_register_execute_command(mock):
> module = Module()
tests/test_module.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aecd81cd0>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_abstract_module_item (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_abstract_module_item():
class TestItem(ModuleItem):
def execute(self) -> None:
raise NotImplementedError
> module = Module()
tests/test_module.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aec97be90>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_configuration_setter (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_configuration_setter():
> module = Module()
tests/test_module.py:101:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aeb118690>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_configuration_setter_as_model (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_configuration_setter_as_model():
class MyConfiguration(BaseModel):
number: int = 0
> module = Module()
tests/test_module.py:111:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aec551390>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_configuration_as_model (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'MyModule' object has no attribute 'upper'
def test_configuration_as_model():
class MyConfiguration(BaseModel):
number: int = 0
class MyModule(Module):
configuration: MyConfiguration
> module = MyModule()
tests/test_module.py:123:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <tests.test_module.test_configuration_as_model.<locals>.MyModule object at 0x7f1aec10c690>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'MyModule' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_configuration_setter_add_secret_not_required (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_configuration_setter_add_secret_not_required():
> module = Module()
tests/test_module.py:139:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aec55f150>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_configuration_setter_add_secret_required (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_configuration_setter_add_secret_required():
> module = Module()
tests/test_module.py:157:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aed51d910>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_module
github-actions / Test Results
test_configuration_setter_missing_required_secret (tests.test_module) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_configuration_setter_missing_required_secret():
> module = Module()
tests/test_module.py:175:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aec955fd0>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError
Check warning on line 0 in tests.test_trigger
github-actions / Test Results
test_token (tests.test_trigger) failed
junit.xml [took 0s]
Raw output
AttributeError: 'Module' object has no attribute 'upper'
def test_token():
> trigger = DummyTrigger()
tests/test_trigger.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sekoia_automation/trigger.py:54: in __init__
super().__init__(module, data_path)
sekoia_automation/module.py:334: in __init__
self.module: Module = module or Module()
sekoia_automation/module.py:53: in __init__
self.init_sentry()
sekoia_automation/module.py:287: in init_sentry
sentry_dsn = self._load_sentry_dsn()
sekoia_automation/module.py:310: in _load_sentry_dsn
return self.load_config(self.SENTRY_FILE_NAME)
sekoia_automation/module.py:264: in load_config
return load_config(file_name, type_, non_exist_ok=non_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = <sekoia_automation.module.Module object at 0x7f1aec9c1610>
type_ = 'sentry_dsn', non_exist_ok = False
def load_config(name: str, type_: str = "str", non_exist_ok=False):
path = Path(f"{VOLUME_PATH}/{name}")
if path.is_file():
with path.open("r") as fd:
if type_ == "json":
return json.load(fd)
return fd.read()
> if value := os.environ.get(name.upper()):
E AttributeError: 'Module' object has no attribute 'upper'
sekoia_automation/config.py:25: AttributeError