예제 #1
0
def test_get_deployment_manifest_name():
    assert Utility.get_deployment_manifest_name(
        "config/deployment.template.json", "0.0.1",
        "amd64") == "deployment.json"
    assert Utility.get_deployment_manifest_name("deployment.template.json",
                                                "0.0.1",
                                                "amd64") == "deployment.json"
    assert Utility.get_deployment_manifest_name(
        "deployment.debug.template.json", "0.0.1",
        "amd64") == "deployment.debug.json"
    assert Utility.get_deployment_manifest_name(
        "config/deployment.template.json", "1.0.0",
        "amd64") == "deployment.amd64.json"
    assert Utility.get_deployment_manifest_name(
        "deployment.template.json", "1.0.0",
        "amd64") == "deployment.amd64.json"
    assert Utility.get_deployment_manifest_name(
        "deployment.debug.template.json", "1.0.0",
        "amd64") == "deployment.debug.amd64.json"
    assert Utility.get_deployment_manifest_name("", "",
                                                "") == "deployment.json"

    os.environ["DEPLOYMENT_CONFIG_FILE"] = "foo.json"
    assert Utility.get_deployment_manifest_name(
        "deployment.debug.template.json", "1.0.0", "amd64") == "foo.json"
예제 #2
0
def test_get_deployment_manifest_name():
    assert Utility.get_deployment_manifest_name("config/deployment.template.json", "0.0.1", "amd64") == "deployment.json"
    assert Utility.get_deployment_manifest_name("deployment.template.json", "0.0.1", "amd64") == "deployment.json"
    assert Utility.get_deployment_manifest_name("deployment.debug.template.json", "0.0.1", "amd64") == "deployment.debug.json"
    assert Utility.get_deployment_manifest_name("config/deployment.template.json", "1.0.0", "amd64") == "deployment.amd64.json"
    assert Utility.get_deployment_manifest_name("deployment.template.json", "1.0.0", "amd64") == "deployment.amd64.json"
    assert Utility.get_deployment_manifest_name("deployment.debug.template.json", "1.0.0", "amd64") == "deployment.debug.amd64.json"
    assert Utility.get_deployment_manifest_name("", "", "") == "deployment.json"
예제 #3
0
def test_get_deployment_manifest_name__set_from_envvar():
    assert Utility.get_deployment_manifest_name("deployment.debug.template.json", "1.0.0", "amd64") == "foo.json"