Package org.apache.zookeeper.server.auth

Examples of org.apache.zookeeper.server.auth.IPAuthenticationProvider


        "127.0.0.1:" + PortAssignment.unique();
    private volatile CountDownLatch startSignal;

    @Test
    public void testIPAuthenticationIsValidCIDR() throws Exception {
        IPAuthenticationProvider prov = new IPAuthenticationProvider();
        Assert.assertTrue("testing no netmask", prov.isValid("127.0.0.1"));
        Assert.assertTrue("testing single ip netmask", prov.isValid("127.0.0.1/32"));
        Assert.assertTrue("testing lowest netmask possible", prov.isValid("127.0.0.1/0"));
        Assert.assertFalse("testing netmask too high", prov.isValid("127.0.0.1/33"));
        Assert.assertFalse("testing netmask too low", prov.isValid("10.0.0.1/-1"));
    }
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.server.auth.IPAuthenticationProvider

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.