|
|
|
@ -3,9 +3,9 @@ from pathlib import Path
|
|
|
|
|
from src.main.python.ddadevops.domain import (
|
|
|
|
|
Version,
|
|
|
|
|
ReleaseType,
|
|
|
|
|
Image,
|
|
|
|
|
)
|
|
|
|
|
from src.main.python.ddadevops.domain.image import Image
|
|
|
|
|
from .test_helper import build_devops, devops_config
|
|
|
|
|
from .helper import build_devops, devops_config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_version_creation():
|
|
|
|
@ -63,6 +63,7 @@ def test_should_create_patch():
|
|
|
|
|
assert sut.to_string() == "1.2.4"
|
|
|
|
|
assert version.to_string() == "1.2.3"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_should_create_minor():
|
|
|
|
|
version = Version.from_str("1.2.3-SNAPSHOT")
|
|
|
|
|
sut = version.create_minor()
|
|
|
|
@ -98,6 +99,7 @@ def test_should_create_major():
|
|
|
|
|
sut = version.create_major()
|
|
|
|
|
assert sut.to_string() == "2.0.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_should_create_bump():
|
|
|
|
|
version = Version.from_str("1.2.3-SNAPSHOT")
|
|
|
|
|
sut = version.create_bump()
|
|
|
|
@ -109,4 +111,4 @@ def test_should_create_bump():
|
|
|
|
|
|
|
|
|
|
version = Version.from_str("1.0.0")
|
|
|
|
|
sut = version.create_bump("SNAPSHOT")
|
|
|
|
|
assert sut.to_string() == "1.0.1-SNAPSHOT"
|
|
|
|
|
assert sut.to_string() == "1.0.1-SNAPSHOT"
|
|
|
|
|