Package com.jamierf.dropwizard.debpkg.resource

Examples of com.jamierf.dropwizard.debpkg.resource.StringResource


    }

    @Test(expected = MissingParameterException.class)
    public void testFailsOnMissingTemplateVariables() throws IOException, PackagingException {
        createPackage(ImmutableList.<Resource>of(
                new StringResource("hello {{{missing.variable}}}", true, "/tmp/test.txt", USER, USER, TarEntry.DEFAULT_FILE_MODE)
        ));
    }
View Full Code Here


    }

    @Test
    public void testCreatesPackage() throws IOException, PackagingException {
        final File debFile = createPackage(ImmutableList.<Resource>of(
                new StringResource("hello world", true, "/tmp/test.txt", USER, USER, TarEntry.DEFAULT_FILE_MODE)
        ));
        assertTrue(debFile.exists());
    }
View Full Code Here

    }

    @Test
    public void testPackageSignature() throws IOException, PackagingException, PGPException, SignatureException, org.bouncycastle.openpgp.PGPException, NoSuchProviderException {
        final File debFile = createPackage(ImmutableList.<Resource>of(
                new StringResource("hello world", true, "/tmp/test.txt", USER, USER, TarEntry.DEFAULT_FILE_MODE)
        ));

        final File packageDir = temporaryFolder.newFolder();
        ArchiveUtils.extractAr(debFile, packageDir);
View Full Code Here

    }

    @Test
    public void testValidArchive() throws IOException, PackagingException {
        final File debFile = createPackage(ImmutableList.<Resource>of(
                new StringResource("hello world", true, "/tmp/test.txt", USER, USER, TarEntry.DEFAULT_FILE_MODE)
        ));

        final File packageDir = temporaryFolder.newFolder();
        ArchiveUtils.extractAr(debFile, packageDir);
    }
View Full Code Here

    }

    @Test
    public void testExpectedControlFiles() throws IOException, PackagingException {
        final File debFile = createPackage(ImmutableList.<Resource>of(
                new StringResource("hello world", true, "/tmp/test.txt", USER, USER, TarEntry.DEFAULT_FILE_MODE)
        ));

        final File packageDir = temporaryFolder.newFolder();
        ArchiveUtils.extractAr(debFile, packageDir);
View Full Code Here

    }

    @Test
    public void testExpectedDataFiles() throws IOException, PackagingException {
        final File debFile = createPackage(ImmutableList.<Resource>of(
                new StringResource("hello world", true, "/tmp/test.txt", USER, USER, TarEntry.DEFAULT_FILE_MODE)
        ));

        final File packageDir = temporaryFolder.newFolder();
        ArchiveUtils.extractAr(debFile, packageDir);
View Full Code Here

    }

    @Test
    public void testTemplatesCorrectlyExecuted() throws IOException, PackagingException {
        final File debFile = createPackage(ImmutableList.<Resource>of(
                new StringResource("hello {{{deb.name}}}", true, "/tmp/test.txt", USER, USER, TarEntry.DEFAULT_FILE_MODE)
        ));

        final File packageDir = temporaryFolder.newFolder();
        ArchiveUtils.extractAr(debFile, packageDir);
View Full Code Here

    }

    @Test
    public void testTemplatesNotExecutedWhenNotFiltered() throws IOException, PackagingException {
        final File debFile = createPackage(ImmutableList.<Resource>of(
                new StringResource("hello {{{deb.name}}}", false, "/tmp/test.txt", USER, USER, TarEntry.DEFAULT_FILE_MODE)
        ));

        final File packageDir = temporaryFolder.newFolder();
        ArchiveUtils.extractAr(debFile, packageDir);
View Full Code Here

    }

    @Test
    public void testFileOwnershipAndPermissions() throws IOException, PackagingException {
        final File debFile = createPackage(ImmutableList.<Resource>of(
                new StringResource("hello world", true, "/test.txt", USER, USER, 0764)
        ));

        final File packageDir = temporaryFolder.newFolder();
        ArchiveUtils.extractAr(debFile, packageDir);
View Full Code Here

TOP

Related Classes of com.jamierf.dropwizard.debpkg.resource.StringResource

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.