Skip to content

Commit

Permalink
Fix pylint error rename (#876)
Browse files Browse the repository at this point in the history
* Revert "Implement podman and docker container runtimes support"

This reverts commit 115c312.

* Ignore too-many-positional-arguments check
  • Loading branch information
mdujava committed Nov 20, 2024
1 parent 3c98d9c commit 87b88a0
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 263 deletions.
2 changes: 0 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ cfssl = "==0.0.3b243"
openshift-client = ">=2.0.1"
hyperfoil-client="*"
paramiko = "*"
docker = "*"
podman = "*"
jsondiff = "*"
weakget = "*"
flaky = "*"
Expand Down
67 changes: 0 additions & 67 deletions doc/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,70 +136,3 @@ def test_skip_apicast_retrying_on_404(application, api_client):
client = api_client(disable_retry_status_list={404})

assert client.get("/status/404").status_code == 404


################################################################################
# Example usage of DockerRuntime
def example_docker():
from testsuite.containers.docker_runtime import DockerRuntime
from testsuite.containers.container_runtime import ContainerConfig
from contextlib import closing

with closing(DockerRuntime("tcp://10.0.145.159:2376")) as d:
cc = ContainerConfig("mysql", "latest", {"MYSQL_ROOT_PASSWORD": "root"}, {"3306": "33767"}, cmd=["ls", "-la"])
cc.attach_volume("/root/dkr", "/mnt")
c = d.run(cc)
print(d.logs(c))

# d.stop(c)
d.delete_container(c)


###############################################################################
# Example usage of PodmanRuntime
def example_podman():
from testsuite.containers.podman_runtime import PodmanRuntime
from testsuite.containers.container_runtime import ContainerConfig
from contextlib import closing

with closing(PodmanRuntime("ssh://[email protected]/run/podman/io.podman")) as d:
cc = ContainerConfig("mysql", "latest", {"MYSQL_ROOT_PASSWORD": "root"}, {"3306": "33075"}, cmd=["ls"])
cc.attach_volume("/root/blah", "/mnt")
c = d.run(cc)
print(d.logs(c))
# d.stop(c)
d.delete_container(c)


###############################################################################
# Example usage of DockerRuntime
def example_docker_no_cm():
from testsuite.containers.docker_runtime import DockerRuntime
from testsuite.containers.container_runtime import ContainerConfig

d = DockerRuntime("tcp://10.0.145.159:2376")
cc = ContainerConfig("mysql", "latest", {"MYSQL_ROOT_PASSWORD": "root"}, {"3306": "33767"}, cmd=["ls", "-la"])
cc.attach_volume("/root/dkr", "/mnt")
c = d.run(cc)
print(d.logs(c))

# d.stop(c)
d.delete_container(c)
d.close()


###############################################################################
# Example usage of PodmanRuntime
def example_podman_no_cm():
from testsuite.containers.podman_runtime import PodmanRuntime
from testsuite.containers.container_runtime import ContainerConfig

d = PodmanRuntime("ssh://[email protected]/run/podman/io.podman")
cc = ContainerConfig("mysql", "latest", {"MYSQL_ROOT_PASSWORD": "root"}, {"3306": "33076"}, cmd=["ls"])
cc.attach_volume("/root/blah", "/mnt")
c = d.run(cc)
print(d.logs(c))
# d.stop(c)
d.delete_container(c)

d.close()
1 change: 1 addition & 0 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ disable=duplicate-code, # reports false alarms AND can't be disabled locally; p
consider-using-f-string, # % string operator is absolutely fine
redefined-outer-name,
missing-timeout, # socket timeout is set globally, no need to specify it in calls
too-many-positional-arguments,

[FORMAT]
# Maximum number of characters on a single line.
Expand Down
Empty file removed testsuite/containers/__init__.py
Empty file.
91 changes: 0 additions & 91 deletions testsuite/containers/container_runtime.py

This file was deleted.

46 changes: 0 additions & 46 deletions testsuite/containers/docker_runtime.py

This file was deleted.

55 changes: 0 additions & 55 deletions testsuite/containers/podman_runtime.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

pytestmark = [
pytest.mark.required_capabilities(Capability.STANDARD_GATEWAY, Capability.CUSTOM_ENVIRONMENT),
pytest.mark.nopersistence # Don't know why this test is failing with persistence plugin,
pytest.mark.nopersistence, # Don't know why this test is failing with persistence plugin,
# and it needs more investigation
]

Expand Down
1 change: 0 additions & 1 deletion testsuite/tests/apicast/test_limit_exceeded_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ def test_anything_else_is_ok(api_client):
"""Call to /anything/else should return 200 OK."""

assert api_client().get("/anything/else").status_code == 200

0 comments on commit 87b88a0

Please sign in to comment.