Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scenario tests started to fail on unexpected relation_id #130

Closed
mmkay opened this issue May 29, 2024 · 1 comment
Closed

Scenario tests started to fail on unexpected relation_id #130

mmkay opened this issue May 29, 2024 · 1 comment

Comments

@mmkay
Copy link

mmkay commented May 29, 2024

In traefik's CI we got a bunch of scenario errors:

______ test_middleware_config[https-True-True-subdomain-ingress-per-unit] ______
Traceback (most recent call last):
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/runner.py", line 341, in from_call
    result: Optional[TResult] = func()
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/runner.py", line 241, in <lambda>
    lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_call
    yield from thread_exception_runtest_hook()
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook
    yield
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook
    yield
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/logging.py", line 850, in pytest_runtest_call
    yield from self._runtest_for(item, "call")
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/logging.py", line 833, in _runtest_for
    yield
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/capture.py", line 878, in pytest_runtest_call
    return (yield)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
    return (yield)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/runner.py", line 183, in pytest_runtest_call
    raise e
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/runner.py", line 173, in pytest_runtest_call
    item.runtest()
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/python.py", line 1632, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/.tox/scenario/lib/python3.8/site-packages/_pytest/python.py", line 162, in pytest_pyfunc_call
    result = testfunction(**testargs)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/unittest/mock.py", line 1325, in patched
    return func(*newargs, **newkeywargs)
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/tests/scenario/test_middlewares.py", line 90, in test_middleware_config
    relation = _create_relation(
  File "/home/runner/work/traefik-k8s-operator/traefik-k8s-operator/tests/scenario/test_middlewares.py", line 50, in _create_relation
    return Relation(
TypeError: __init__() got an unexpected keyword argument 'relation_id'
@PietroPasotti
Copy link
Collaborator

Fixed in #131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants