ClickHouse/tests/ci/test_docker.py
2024-08-02 18:23:52 +02:00

20 lines
585 B
Python

#!/usr/bin/env python
import unittest
from version_helper import get_version_from_string
import docker_server as ds
class TestDockerServer(unittest.TestCase):
def test_gen_tags(self):
version = get_version_from_string("22.2.2.2")
cases = (
("release-latest", ["latest", "22", "22.2", "22.2.2", "22.2.2.2"]),
("release", ["22", "22.2", "22.2.2", "22.2.2.2"]),
("head", ["head"]),
)
for case in cases:
release_type = case[0]
self.assertEqual(case[1], ds.gen_tags(version, release_type))