ArchiveIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Restructured ArchiveIntegrationTest: - Moved ArchiveIntegrationTest from integTest to :core:integTest. - Put Jar related integration Tests into JarIntegrationTest in :plugins:integTest. - Put War related integration Tests into JarIntegrationTest in :plugins:integTest.

  1. … 5 more files in changeset.
Revert "Move ArchiveIntegrationTest to core:integTest; remove permission checks as they are seperated tested; Cleanup ArchiveTaskPermissionsIntegrationTest"

This reverts commit a11010ad9bdd3fc3dbacc75bdcf55997f68e7514.

  1. … 3 more files in changeset.
Move ArchiveIntegrationTest to core:integTest; remove permission checks as they are seperated tested; Cleanup ArchiveTaskPermissionsIntegrationTest

  1. … 3 more files in changeset.
Removing some redundant test code that broke when permissions were preserved by default.

Everything related to permissions during copying is covered in unit-test + CopyTaskPermissionsIntegrationTest.

- Shuffled some classes around in o.g.integtests.fixtures to remove package cycle. - Switched on package cycle checking for a few more projects. - Switched off class cycle checking, just do packages for now.

  1. … 115 more files in changeset.
Rationalized abstractions and implementations of Resource/ReadableResource

-More refactorings after the pairing session.

-Now Resource is the top element in the hierarchy and it only describes the resource.

-Removed some internal interfaces/implementations that dealt with describing resources. Now it is not needed as every resource is described.

  1. … 12 more files in changeset.
Housekeeping. Namespaced the resource utility methods to "project.resources".

  1. … 8 more files in changeset.
Refactored the api around the tarTree so that it is more consistent with the 'Resource' pattern.

Concealed the Compressor interface as we will go for the writable Resource implementations in future. At the moment it seems costly to do so because we would have to tear apart the TarCopySpecVisitor.

  1. … 15 more files in changeset.
Refactored the api around the tarTree and added some integration coverage. Added resources package to the default-imports (driven by the integ test).

  1. … 5 more files in changeset.
Refactored the api around the tarTree and introduced the concept of Resource.

Meaty check-in but I didn't figure out an easy way to increment it. Instead of ArchiveFileTree specialization of the FileTree I made the FileTree work with abstract concept of a Resource rather than a decompressor. This is a first step towards 'Resources', still long way to go, it will be improved as we start use them more broadly. The idea is a result of pairing with Adam.

- For now, I only implemented the ReadableResource because that's the only thing I need at the moment. In future we will change the resource factory methods to return Resource instances rather than ReadableResource instances

- Added a handful of methods to the FileOperations but I'm meaning to namespace them soon.

- got rid of the tarTree method that accepted a closure. We don't need it any more as the FileTree produced by the tarTree is immutable

- some refactoring and possibly some coverage still pending. Namespacing of resource factory methods pending.

Some benefits:

- introduced 'Resource' and made first steps towards this path

- flexibility. the user can provide his own implementation of Resource and hence is able to work with exotic tars or (or exotic locations of tars)

- no need to add more methods to the Project API (e.g. various overloads of tarTree not needed, tarTree is immutable)

  1. … 22 more files in changeset.
describe test preconditions with @Requires use MyFileSystem instead of PosixUtil in tests

  1. … 8 more files in changeset.
Fixed intermittent test failure due to GRADLE-1952 (some improper TAR archives are proper enough for the untarring to execute and produce gibberish). Creating an improper tar every time the test runs proved unsafe as sometimes the produced archive was good enough for the untarring to run. I've placed an 'properly' improper tar in the resources and that should make the test stable.

  1. … 1 more file in changeset.
Improved the error message when tarTree cannot expand the tar (+integ test). Mentioned the option to specify the compression directly. Some rename job for better clarity.

  1. … 3 more files in changeset.
GRADLE-947 tarTree area. Adding DSL flavor: tarTree(path, Closure). Included documentation with samples and tweaked one integ test.

  1. … 6 more files in changeset.
GRADLE-947 tarTree area. Made sure that the getCompression() works well for Tar (and also in backwards compatible fashion). I think that down the road we should rid the Compression enum because they are somewhat problematic when DSL needs to be refactored.

  1. … 1 more file in changeset.
GRADLE-947 tarTree area. In order to make the dsl symmetric with Tar and also more natural I added a getter for compression. This will also be helpful with next steps of the refactoring. At the moment, when custom decompressor is used we return Compression.NONE - it will get fixed later.

  1. … 6 more files in changeset.
GRADLE-947 tarTree area. Added basic way for the user to specify the compression for the tarTree. Under the hood we actually configure a decompressor that will be used. The coming commits will make it more friendly to use.

  1. … 3 more files in changeset.
GRADLE-947 tarTree area. Added bunch of decompressors, including AutoDetecting one, that chooses the decompressor based on file extension.

  1. … 8 more files in changeset.
GRADLE-947 tarTree area. Added integration coverage. It will be rationalized/deduplicated later once the refactoring is done.

excluded some assertions from being executed when build is run on unsupported OS

Fixed usage of TestFile#leftShift that broke with the change to make this method append to the file instead of overwriting.

  1. … 1 more file in changeset.
After merging idea & eclipse subproject I moved integTests accordingly. This refactoring makes it much easier to run only the ide-specific tests if one changes only eclipse/idea plugin. Needed to move one common base class to core fixtures.

  1. … 196 more files in changeset.
GRADLE-1355 - Move integration tests out of core project and into their own integTest project.

    • -0
    • +661
    ./ArchiveIntegrationTest.groovy
  1. … 668 more files in changeset.