Package org.candlepin.policy

Examples of org.candlepin.policy.ValidationResult


    }

    @Test
    public void x86ArchitectureProvidesI686() {
        Pool pool = setupArchTest("arch", "x86", "uname.machine", "i686");
        ValidationResult result = enforcer.preEntitlement(consumer, pool, 1);
        assertFalse(result.hasErrors());
        assertFalse(result.hasWarnings());
    }
View Full Code Here


    }

    @Test
    public void testEmptyUname() {
        Pool pool = setupArchTest("arch", "s390x,x86", "uname.machine", "");
        ValidationResult result = enforcer.preEntitlement(consumer, pool, 1);
        assertFalse(result.hasErrors());
        assertTrue(result.hasWarnings());
    }
View Full Code Here

    }

    @Test
    public void testEmptyArch() {
        Pool pool = setupArchTest("arch", "", "uname.machine", "x86_64");
        ValidationResult result = enforcer.preEntitlement(consumer, pool, 1);
        assertFalse(result.hasErrors());
        assertTrue(result.hasWarnings());
    }
View Full Code Here

    @Test
    public void testDuplicateArchesMatches() {
        Pool pool = setupArchTest("arch", "x86_64,x86_64", "uname.machine",
            "x86_64");
        ValidationResult result = enforcer.preEntitlement(consumer, pool, 1);
        assertFalse(result.hasErrors());
        assertFalse(result.hasWarnings());
    }
View Full Code Here

    @Test
    public void testDuplicateArchesNoMatches() {
        Pool pool = setupArchTest("arch", "x86_64,x86_64", "uname.machine",
            "z80");
        ValidationResult result = enforcer.preEntitlement(consumer, pool, 1);
        assertFalse(result.hasErrors());
        assertTrue(result.hasWarnings());
    }
View Full Code Here

    @Test
    public void testCommaSplitArchesTrailingComma() {
        Pool pool = setupArchTest("arch", "x86_64,x86_64,", "uname.machine",
            "x86_64");
        ValidationResult result = enforcer.preEntitlement(consumer, pool, 1);
        assertFalse(result.hasErrors());
        assertFalse(result.hasWarnings());
    }
View Full Code Here

    @Test
    public void testCommaSplitArchesExtraSpaces() {
        Pool pool = setupArchTest("arch", "x86_64,  z80 ", "uname.machine",
            "x86_64");
        ValidationResult result = enforcer.preEntitlement(consumer, pool, 1);
        assertFalse(result.hasErrors());
        assertFalse(result.hasWarnings());
    }
View Full Code Here

    @Test
    public void multipleArchesNoMatches() {
        Pool pool = setupArchTest("arch", "s390x,z80,ppc64", "uname.machine",
            "i686");
        ValidationResult result = enforcer.preEntitlement(consumer, pool, 1);
        assertFalse(result.hasErrors());
        assertTrue(result.hasWarnings());
    }
View Full Code Here

    }

    @Test
    public void multipleArchesMatches() {
        Pool pool = setupArchTest("arch", "s390x,x86", "uname.machine", "i686");
        ValidationResult result = enforcer.preEntitlement(consumer, pool, 1);
        assertFalse(result.hasErrors());
        assertFalse(result.hasWarnings());
    }
View Full Code Here

    }

    @Test
    public void goodArchNoUnameMachine() {
        Pool pool = setupArchTest("arch", "x86", "something.not.uname", "i686");
        ValidationResult result = enforcer.preEntitlement(consumer, pool, 1);
        assertFalse(result.hasErrors());
        assertTrue(result.hasWarnings());
    }
View Full Code Here

TOP

Related Classes of org.candlepin.policy.ValidationResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.