Skip to content

Commit

Permalink
tests: set mtime to the epoch
Browse files Browse the repository at this point in the history
so it won't be different once added to OSTree.

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Jun 22, 2018
1 parent 732c5ca commit 83481e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ function teardown() {
# Create a file "$1" with random contents of length $2, or 256.
function createrandom() {
dd if=/dev/urandom bs=1 count=${2:-256} of=${1:-${BATS_TMPDIR}/randomfile} status=none
# Set the mtime to the epoch so it won't be different once it is deduplicated with OSTree
touch -t 7001010000.00 ${1:-${BATS_TMPDIR}/randomfile}
}

# Run the CLI with the specified options.
Expand Down

0 comments on commit 83481e1

Please sign in to comment.