diff options
author | Dan Nicholson <nicholson@endlessm.com> | 2019-10-22 15:14:58 -0600 |
---|---|---|
committer | Dan Nicholson <nicholson@endlessm.com> | 2020-01-20 20:42:27 -0700 |
commit | 1ea719b76bfa94181eb5d228c5c6be10e14b64f1 (patch) | |
tree | 80ef5ca6ffc165c774408fbafa64e66405e45887 | |
parent | 44fb5e72a1496d42ff500926a99dbe4c6cb44da6 (diff) | |
download | ostree-1ea719b76bfa94181eb5d228c5c6be10e14b64f1.tar.gz |
tests/sizes: Test sizes metadata with existing objects
Repeat the commit to make sure that the files are enumerated again for
the size metadata.
-rwxr-xr-x | tests/test-sizes.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/test-sizes.js b/tests/test-sizes.js index 622c2d1b..a3928fe8 100755 --- a/tests/test-sizes.js +++ b/tests/test-sizes.js @@ -118,7 +118,7 @@ function validateSizes(repo, commit, expectedFiles) { } } -print('1..1') +print('1..2') let testDataDir = Gio.File.new_for_path('test-data'); testDataDir.make_directory(null); @@ -156,3 +156,17 @@ let expectedFiles = { validateSizes(repo, commit, expectedFiles); print("ok test-sizes"); + +// Repeat the commit now that all the objects are cached and ensure the +// metadata is still correct +repo.prepare_transaction(null); +mtree = OSTree.MutableTree.new(); +repo.write_directory_to_mtree(testDataDir, mtree, commitModifier, null); +[,dirTree] = repo.write_mtree(mtree, null); +[,commit] = repo.write_commit(null, 'Another subject', 'Another body', null, dirTree, null); +print("commit => " + commit); +repo.commit_transaction(null); + +validateSizes(repo, commit, expectedFiles); + +print("ok test-sizes repeated"); |