Package com.heroku.api.request.key

Examples of com.heroku.api.request.key.KeyAdd


    /**
     * Add an ssh key to the current user's account.
     * @param sshKey Public key value. e.g. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCz29znMi/UJX/nvkRSO5FFugKhU9DkkI53E0vXUnP8zeLFxMgyUqmXryPVjWtGzz2LRWqjm14SbqHAmM44pGHVfBIp6wCKBWSUYGv/FxOulwYgtWzz4moxWLZrFyWWgJAnehcVUifHNgzKwT2ovWm2ns52681Z8yFK3K8/uLStDjLIaPePEOaxaTvgIxZNsfyEoXoHcyTPwdR1GtQuDTuDYqYmjmPCoKybYnXrTQ1QFuQxDneBkswQYSl0H2aLf3uBK4F01hr+azXQuSe39eSV4I/TqzmNJlanpILT9Jz3/J1i4r6brpF3AxLnFnb9ufIbzQAIa/VZIulfrZkcBsUl user@company.com
     */
    public void addKey(String sshKey) {
        connection.execute(new KeyAdd(sshKey), apiKey);
    }
View Full Code Here


        return new Object[][]{{pubKey, comment}};
    }

    @Test(dataProvider = "publicKey")
    public void testKeysAddCommand(String pubKey, String comment) throws JSchException, IOException {
        KeyAdd cmd = new KeyAdd(pubKey);
        Unit response = connection.execute(cmd, API_KEY);
        assertTrue(keyIsPresent(comment), comment + " should have been added.");
    }
View Full Code Here

    //    assertFalse(keyIsPresent(comment));
    //}

    @Test(dataProvider = "publicKey", expectedExceptions = RequestFailedException.class, singleThreaded = true)
    public void testKeysAddCommandWithDuplicateKey(String pubKey, String comment) throws IOException {
        KeyAdd keyAdd = new KeyAdd(pubKey);
        connection.execute(keyAdd, API_KEY);
        connection.execute(keyAdd, IntegrationTestConfig.CONFIG.getOtherUser().getApiKey());
    }
View Full Code Here

        connection.execute(keyAdd, IntegrationTestConfig.CONFIG.getOtherUser().getApiKey());
    }

    @Test(dataProvider = "publicKey")
    public void testKeyListCommand(String pubKey, String comment) {
        connection.execute(new KeyAdd(pubKey), API_KEY);
        KeyList keyListRequest = new KeyList();
        List<Key> keyListResponse = connection.execute(keyListRequest, API_KEY);
        Assert.assertTrue(keyIsPresent(comment, keyListResponse), comment + " should have been present.");
    }
View Full Code Here

TOP

Related Classes of com.heroku.api.request.key.KeyAdd

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.