mirror of
https://github.com/open-webui/terminals.git
synced 2026-11-22 21:50:42 -05:00
refac
This commit is contained in:
1 parent
56e3e75bf1
commit
ddb8338e25
4 files changed
+46
-2
No files matched your search
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.0.5] - 2026-07-09
|
||||
|
||||
### Added
|
||||
- Added Kubernetes node selector and toleration overrides for terminal and reset pods.
|
||||
|
||||
## [0.0.4] - 2026-06-29
|
||||
|
||||
### Added
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "terminals"
|
||||
version = "0.0.4"
|
||||
version = "0.0.5"
|
||||
description = "Multi-tenant terminal orchestrator for Open Terminal."
|
||||
readme = "README.md"
|
||||
authors = [
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import unittest
|
||||
|
||||
from terminals.utils.kubernetes_scheduling import (
|
||||
_parse_node_selector,
|
||||
_parse_tolerations,
|
||||
)
|
||||
|
||||
|
||||
class KubernetesSchedulingTests(unittest.TestCase):
|
||||
def test_node_selector_accepts_pairs(self) -> None:
|
||||
self.assertEqual(
|
||||
_parse_node_selector("dedicated=terminals, disk=fast"),
|
||||
{"dedicated": "terminals", "disk": "fast"},
|
||||
)
|
||||
|
||||
def test_node_selector_accepts_json(self) -> None:
|
||||
self.assertEqual(
|
||||
_parse_node_selector('{"dedicated":"terminals"}'),
|
||||
{"dedicated": "terminals"},
|
||||
)
|
||||
|
||||
def test_tolerations_accepts_json_array(self) -> None:
|
||||
self.assertEqual(
|
||||
_parse_tolerations(
|
||||
'[{"key":"dedicated","operator":"Equal","value":"terminals","effect":"NoSchedule"}]'
|
||||
),
|
||||
[
|
||||
{
|
||||
"key": "dedicated",
|
||||
"operator": "Equal",
|
||||
"value": "terminals",
|
||||
"effect": "NoSchedule",
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user