def test_PodSpec_verify_params_smoke(): c = ContainerSpec() d = Dependency() s = PodSpec() s.Containers = [c] s.Dependencies = [d] assert not s.verify_params() s.Name = "web" s.Namespace = "hello.foo.bar" assert not s.verify_params() c.Image = "hello/release-123-456" assert s.verify_params()
def test_PodGroupSpec_verify_params_smoke(): c = ContainerSpec() d = Dependency() p = PodSpec() p.Containers = [c] p.Dependencies = [d] s = PodGroupSpec() s.Pod = p s.NumInstances = 1 s.RestartPolicy = RestartPolicy.OnFail assert not s.verify_params() s.Name = "web" s.Namespace = "hello.foo.bar" assert not s.verify_params() p.Name = "web" p.Namespace = "hello.foo.bar" assert not s.verify_params() c.Image = "hello/release-123-456" assert s.verify_params()
def test_AppSpec_verify_params_smoke(): c = ContainerSpec() d = Dependency() p = PodSpec() p.Containers = [c] p.Dependencies = [d] pg = PodGroupSpec() pg.Pod = p pg.NumInstances = 1 pg.RestartPolicy = RestartPolicy.OnFail a = AppSpec() a.PodGroups = [pg] assert not a.verify_params() a.AppName = "hello" assert not a.verify_params() pg.Name = "web" pg.Namespace = "hello.foo.bar" assert not a.verify_params() p.Name = "web" p.Namespace = "hello.foo.bar" assert not a.verify_params() c.Image = "hello/release-123-456" assert a.verify_params()