Skip to content

Add support for Connectors #281

Add support for Connectors

Add support for Connectors #281

GitHub Actions / Test Results failed Oct 4, 2023 in 0s

22 errors, 57 fail, 1 skipped, 77 pass in 41s

157 tests  ±0   77 ✔️ ±0   41s ⏱️ -3s
    1 suites ±0     1 💤 ±0 
    1 files   ±0   57 ±0   22 🔥 ±0 

Results for commit 76f29db. ± Comparison against earlier commit 2357c44.

Annotations

Check warning on line 0 in tests.test_action

See this annotation in the file changed.

@github-actions 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 0x7f120d9b0cd0>
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

See this annotation in the file changed.

@github-actions 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/tmpf2glgh9x')

    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 0x7f120c5d3150>
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

See this annotation in the file changed.

@github-actions 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 0x7f120c12b3d0>
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

See this annotation in the file changed.

@github-actions 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/tmp6h3w_emc')

    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 0x7f120c182450>
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

See this annotation in the file changed.

@github-actions 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 0x7f120c129850>
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

See this annotation in the file changed.

@github-actions 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/tmp9o879kqq')

    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 0x7f120c5cc790>
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

See this annotation in the file changed.

@github-actions 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 0x7f120d58f150>
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

See this annotation in the file changed.

@github-actions 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 0x7f120d11e950>
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

See this annotation in the file changed.

@github-actions 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='139715484327888'>
__ = <MagicMock name='has_secrets' id='139715493592400'>
kwargs = {'m': <requests_mock.mocker.Mocker object at 0x7f120bd41c50>}
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 0x7f120c1f6c50>
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

See this annotation in the file changed.

@github-actions 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='139715475977168'>
__ = <MagicMock name='has_secrets' id='139715480319120'>
kwargs = {'m': <requests_mock.mocker.Mocker object at 0x7f120b92f510>}
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 0x7f120b92c890>
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

See this annotation in the file changed.

@github-actions 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 0x7f120a943950>
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

See this annotation in the file changed.

@github-actions 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 0x7f120a941c10>
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

See this annotation in the file changed.

@github-actions 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 0x7f120a5f5910>
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

See this annotation in the file changed.

@github-actions 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 0x7f120a5b3710>
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

See this annotation in the file changed.

@github-actions 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 0x7f120a550710>
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

See this annotation in the file changed.

@github-actions 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='139715455391568'>

    @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 0x7f120a16bb90>
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

See this annotation in the file changed.

@github-actions 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='139715459858384'>

    @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 0x7f120a5ab2d0>
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

See this annotation in the file changed.

@github-actions 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 0x7f120ad02050>
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

See this annotation in the file changed.

@github-actions 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 0x7f120a94c190>
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

See this annotation in the file changed.

@github-actions 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 0x7f120b11bbd0>
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

See this annotation in the file changed.

@github-actions 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 0x7f120ad84d10>
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

See this annotation in the file changed.

@github-actions 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 0x7f120b19b710>
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

See this annotation in the file changed.

@github-actions 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 0x7f120b1a9690>
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

See this annotation in the file changed.

@github-actions 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 0x7f120b5971d0>
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

See this annotation in the file changed.

@github-actions 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 0x7f120b1c1610>
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