|
|
@ -2,6 +2,7 @@ from pathlib import Path
|
|
|
|
from src.main.python.ddadevops.domain import (
|
|
|
|
from src.main.python.ddadevops.domain import (
|
|
|
|
BuildFileType,
|
|
|
|
BuildFileType,
|
|
|
|
BuildFile,
|
|
|
|
BuildFile,
|
|
|
|
|
|
|
|
Version,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -31,3 +32,21 @@ def test_sould_calculate_build_type():
|
|
|
|
"content"
|
|
|
|
"content"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assert sut.build_file_type() == BuildFileType.JAVA_CLOJURE
|
|
|
|
assert sut.build_file_type() == BuildFileType.JAVA_CLOJURE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_sould_parse_version():
|
|
|
|
|
|
|
|
sut = BuildFile(
|
|
|
|
|
|
|
|
Path("./package.js"),
|
|
|
|
|
|
|
|
"""{
|
|
|
|
|
|
|
|
"name": "c4k-jira",
|
|
|
|
|
|
|
|
"description": "Generate c4k yaml for a jira deployment.",
|
|
|
|
|
|
|
|
"author": "meissa GmbH",
|
|
|
|
|
|
|
|
"version": "1.1.5-SNAPSHOT",
|
|
|
|
|
|
|
|
"homepage": "https://gitlab.com/domaindrivenarchitecture/c4k-jira#readme",
|
|
|
|
|
|
|
|
"bin": {
|
|
|
|
|
|
|
|
"c4k-jira": "./c4k-jira.js"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
assert sut.get_version() == Version.from_str("1.1.5-SNAPSHOT")
|
|
|
|
|
|
|
|
|
|
|
|