ClickHouse/tests/ci/test_docker.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
585 B
Python
Raw Normal View History

#!/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):
2022-04-01 15:53:43 +00:00
version = get_version_from_string("22.2.2.2")
cases = (
2024-08-02 07:23:40 +00:00
("release-latest", ["latest", "22", "22.2", "22.2.2", "22.2.2.2"]),
("release", ["22", "22.2", "22.2.2", "22.2.2.2"]),
2022-04-01 15:53:43 +00:00
("head", ["head"]),
)
for case in cases:
2022-04-01 15:53:43 +00:00
release_type = case[0]
self.assertEqual(case[1], ds.gen_tags(version, release_type))