Sha256: 4be5050aae7069f446c6fa7260358ca7d08f783832d45e40d627b6e1667c4920

Contents?: true

Size: 1.61 KB

Versions: 17

Compression:

Stored size: 1.61 KB

Contents

# How to Archive Files from the Systems Under Test (SUTs)

Oftentimes when you're dealing with beaker test development or troubleshooting
a failed acceptance test, you'll need to get information from a SUT. The
traditional way that we've advocated getting information from these machines is
to use our [preserved hosts functionality](preserve_hosts.md).

If you're preserving hosts just to SSH in and look at log files, however, this
can be a tedious exercise. Why not just bring the log files to you on the
beaker coordinator? This doc explains exactly how to do that using our
`archive_file_from` Domain-Specific Language (DSL) method
([method rubydocs](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Helpers/HostHelpers#archive_file_from-instance_method)).

# How Do I Use This?

`archive_file_from` is a part of the beaker DSL, so it's available in all test
suites. Just call it from your tests, and it'll execute, pulling any particular
file you need off your SUTs, and dropping it on your beaker coordinator's
file system.

A common example of a post-suite step to archive files that were created during
a particular test is included in the Rubydocs, referenced above. Path details,
and details of all method arguments are documented there as well. Check it out,
and with the right use, you won't need to preserve hosts at all to debug any
test failures.

# When Did This Come Out?

`archive_file_from` was originally added to the DSL in beaker
[2.48.0](https://github.com/puppetlabs/beaker/releases/tag/2.48.0), released on
[July 27, 2016](https://github.com/puppetlabs/beaker/blob/master/HISTORY.md#2480---27-jul-2016-47d3aa18).

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
beaker-3.12.0 docs/how_to/archive_sut_files.md
beaker-3.11.0 docs/how_to/archive_sut_files.md
beaker-3.10.0 docs/how_to/archive_sut_files.md
beaker-3.9.0 docs/how_to/archive_sut_files.md
beaker-3.8.0 docs/how_to/archive_sut_files.md
beaker-3.7.0 docs/how_to/archive_sut_files.md
beaker-3.6.0 docs/how_to/archive_sut_files.md
beaker-2.52.0 docs/how_to/archive_sut_files.md
beaker-3.5.0 docs/how_to/archive_sut_files.md
beaker-3.4.0 docs/how_to/archive_sut_files.md
beaker-3.3.0 docs/how_to/archive_sut_files.md
beaker-3.2.0 docs/how_to/archive_sut_files.md
beaker-3.1.0 docs/how_to/archive_sut_files.md
beaker-3.0.0 docs/how_to/archive_sut_files.md
beaker-2.51.0 docs/how_to/archive_sut_files.md
beaker-2.50.0 docs/how_to/archive_sut_files.md
beaker-2.49.0 docs/how_to/archive_sut_files.md