Skip to content

Commit 52e5f6b

Browse files
committed
Install a test dependency in the live pipelines test smoke test
1 parent f54bac7 commit 52e5f6b

5 files changed

Lines changed: 21 additions & 2 deletions

File tree

‎acceptance/pipelines/test/live/databricks.yml.tmpl‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ resources:
1717
sources:
1818
- glob:
1919
include: ./tests/**
20+
environment:
21+
dependencies:
22+
- -e ./helpers
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def order_total(amounts):
2+
return sum(amounts)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[build-system]
2+
requires = ["setuptools>=61"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "order-helpers"
7+
version = "0.1.0"
8+
9+
[tool.setuptools]
10+
py-modules = ["order_helpers"]

‎acceptance/pipelines/test/live/output.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
>>> [CLI] bundle deploy
33
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-pipelines-test-live-[UNIQUE_NAME]/default/files...
44
Created pipelines.orders
5-
Files: 4 uploaded, 0 deleted
5+
Files: 6 uploaded, 0 deleted
66
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
77

88
=== Run the tests and wait for the results
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
# order_helpers is not on the import path; only its installation as a test dependency provides it.
2+
from order_helpers import order_total
3+
4+
15
def test_order_total():
2-
assert sum([1, 2, 3]) == 6
6+
assert order_total([1, 2, 3]) == 6

0 commit comments

Comments
 (0)