Skip to content

Commit 138b599

Browse files
committed
fix custom image integration test
1 parent 710c606 commit 138b599

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

.github/workflows/kubernetes-deploy.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ jobs:
7171
echo $GATEWAY_HOST
7272
# basic tests
7373
cd /home/runner/work/qiskit-serverless/qiskit-serverless/tests/basic
74-
rm 06_function.py
7574
for f in *.py; do echo "TEST: $f" && python "$f"; done
7675
# experimental tests
7776
cd /home/runner/work/qiskit-serverless/qiskit-serverless/tests/experimental

tests/basic/06_function.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,12 @@
2121
provider=os.environ.get("PROVIDER_ID", "mockprovider"),
2222
description=help,
2323
)
24-
serverless.upload(function_with_custom_image)
24+
runnable_function = serverless.upload(function_with_custom_image)
2525

26-
my_functions = serverless.list()
27-
for function in my_functions:
28-
print("Name: " + function.title)
29-
print(function.description)
30-
print()
31-
32-
my_function = serverless.get("custom-image-function")
33-
job = my_function.run(message="Argument for the custum function")
26+
job = runnable_function.run(message="Argument for the custum function")
3427

3528
print(job.result())
3629
print(job.logs())
3730

38-
jobs = my_function.jobs()
31+
jobs = runnable_function.jobs()
3932
print(jobs)

tests/docker/test_docker.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,7 @@ def test_multiple_runs(self, base_client: BaseClient):
143143
assert isinstance(retrieved_job1.logs(), str)
144144
assert isinstance(retrieved_job2.logs(), str)
145145

146-
@mark.skip(
147-
reason="Images are not working in tests jet and "
148-
+ "LocalClient does not manage image instead of working_dir+entrypoint"
149-
)
150-
def test_error(self, base_client: BaseClient):
146+
def test_custom_image(self, serverless_client: BaseClient):
151147
"""Integration test to force an error."""
152148

153149
description = """
@@ -166,7 +162,7 @@ def test_error(self, base_client: BaseClient):
166162
description=description,
167163
)
168164

169-
runnable_function = base_client.upload(function_with_custom_image)
165+
runnable_function = serverless_client.upload(function_with_custom_image)
170166

171167
job = runnable_function.run(message="Argument for the custum function")
172168

0 commit comments

Comments
 (0)