Skip to content

Commit aedef28

Browse files
mdesmethashhar
authored andcommitted
Remove broken test CLI
1 parent fe9a80b commit aedef28

File tree

2 files changed

+0
-81
lines changed

2 files changed

+0
-81
lines changed

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"httpretty < 1.1",
3939
"pytest",
4040
"pytest-runner",
41-
"click",
4241
"pre-commit",
4342
"black",
4443
"isort",

tests/integration/conftest.py

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from contextlib import closing
1818
from uuid import uuid4
1919

20-
import click
2120
import pytest
2221

2322
import trino.logging
@@ -133,19 +132,6 @@ def stop_trino(container_id, proc):
133132
subprocess.check_call(["docker", "kill", container_id])
134133

135134

136-
def find_images(name):
137-
assert name
138-
output = subprocess.check_output(
139-
["docker", "images", "--format", "{{.Repository}}:{{.Tag}}", name]
140-
)
141-
return [line.decode() for line in output.splitlines()]
142-
143-
144-
def image_exists(name):
145-
images = find_images(name)
146-
return images and images[0].strip() == name
147-
148-
149135
@pytest.fixture(scope="module")
150136
def run_trino():
151137
image_tag = os.environ.get("TRINO_IMAGE")
@@ -160,69 +146,3 @@ def run_trino():
160146

161147
def trino_version():
162148
return TRINO_VERSION
163-
164-
165-
@click.group()
166-
def cli():
167-
pass
168-
169-
170-
@click.option(
171-
"--cache/--no-cache", default=True, help="enable/disable Docker build cache"
172-
)
173-
@click.command()
174-
def trino_server():
175-
container_id, _, _, _ = start_trino_and_wait()
176-
177-
178-
@click.argument("container_id", required=False)
179-
@click.command()
180-
def trino_cli(container_id=None):
181-
if not container_id:
182-
container_id = os.environ.get("TRINO_CONTAINER")
183-
if not container_id:
184-
raise ValueError("no container specified")
185-
subprocess.call(
186-
[
187-
"docker",
188-
"exec",
189-
"-t",
190-
"-i",
191-
container_id,
192-
"bin/trino-cli",
193-
"--server",
194-
"localhost:8080",
195-
]
196-
)
197-
198-
199-
@cli.command("list")
200-
def list_():
201-
subprocess.check_call(
202-
["docker", "ps", "--filter", "name=trino-python-client-tests-"]
203-
)
204-
205-
206-
@cli.command()
207-
def clean():
208-
cmd = (
209-
"docker ps "
210-
"--filter name=trino-python-client-tests- "
211-
"--format={{.Names}} | "
212-
"xargs -n 1 docker kill" # NOQA deliberate additional indent
213-
)
214-
subprocess.check_output(cmd, shell=True)
215-
216-
217-
@cli.command()
218-
def tests():
219-
subprocess.check_call(["./tests_unit"])
220-
subprocess.check_call(["./tests_integration"])
221-
222-
223-
cli.add_command(trino_server)
224-
cli.add_command(trino_cli)
225-
226-
227-
if __name__ == "__main__":
228-
cli()

0 commit comments

Comments
 (0)