Skip to content

Commit

Permalink
Add initial TES integration test (Funnel)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeckman314 committed Mar 2, 2024
1 parent 8a4d9d9 commit a69a458
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/integration/test_funnel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import unittest
import tes


class TestTESClient(unittest.TestCase):
def setUp(self):
self.cli = tes.HTTPClient("http://localhost:8000", timeout=5)
self.task = tes.Task(
executors=[
tes.Executor(
image="alpine",
command=["echo", "hello"]
)
]
)

def test_task_creation(self):
# Test service info retrieval
service_info = self.cli.get_service_info()
self.assertIsNotNone(service_info)

# Test task creation
task_id = self.cli.create_task(self.task)
self.assertIsNotNone(task_id)

# Wait for task to complete
_ = self.cli.wait(task_id)

# Test task info retrieval
task_info = self.cli.get_task(task_id, view="BASIC")
self.assertIsNotNone(task_info)


if __name__ == '__main__':
unittest.main()

0 comments on commit a69a458

Please sign in to comment.