Skip to content

'KubernetesProxy' object has no attribute 'temp_ca_file' in tests #1154

@dimaqq

Description

@dimaqq

Description

tests pass, but following error is reported:

Urgency

Casually reporting

Python-libjuju version

3.5.2.0

Juju version

any

Reproduce / Test

# tox -e unit

tests/unit/test_proxy_kubernetes.py::TestKubernetesProxy::test_remote_port_error
  /code/python-libjuju/.tox/py3/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored in: <function KubernetesProxy.__del__ at 0xee3a9ca1c040>

  Traceback (most recent call last):
    File "/code/python-libjuju/juju/client/proxy/kubernetes/proxy.py", line 34, in __init__
      self.remote_port = int(remote_port)
                         ^^^^^^^^^^^^^^^^
  ValueError: invalid literal for int() with base 10: 'not-a-integer-port'

  During handling of the above exception, another exception occurred:

  ValueError: Invalid port number: not-a-integer-port

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/code/python-libjuju/juju/client/proxy/kubernetes/proxy.py", line 67, in __del__
      os.unlink(self.temp_ca_file.name)
                ^^^^^^^^^^^^^^^^^
  AttributeError: 'KubernetesProxy' object has no attribute 'temp_ca_file'

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/testsUpdates the tests or test infrastructurehint/help-wantedExtra attention is neededkind/bugindicates a bug in the projectkind/testinvalid or failing tests cases, build errors due to a test case, any problems regarding testing.priority/lowlow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions