summaryrefslogtreecommitdiff
path: root/tests/test-core.js
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* repo: Require lock type in ostree_repo_lock_popDan Nicholson2021-06-051-3/+3
| | | | | | | | This simplifies the lock state management considerably since the previously pushed type doesn't need to be tracked. Instead, 2 counters are kept to track how many times each lock type has been pushed. When the number of exclusive locks drops to 0, the lock transitions back to shared.
* repo: Make locking APIs publicColin Walters2021-06-051-0/+8
| | | | | | | | Doing anything even somewhat sophisticated requires this; turns out our own `ostree prune` CLI wants this, e.g. https://github.com/ostreedev/ostree/issues/2337 Closes: https://github.com/ostreedev/ostree/issues/2286
* tests: More tests for inline writingColin Walters2021-04-091-1/+21
| | | | I'm hitting a bug, add more tests.
* repo: Add ostree_repo_write_regfileColin Walters2021-04-091-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | This API is push rather than pull, which makes it much more suitable to use cases like parsing a tar file from external code. Now, we have a large mess in this area internally because the original file writing code was pull based, but static deltas hit the same problem of wanting a push API, so I added this special `OstreeRepoBareContent` just for writing regular files from a push API. Eventually...I'd like to deprecate the pull based API, and rework things so that for regular files the push API is the default, and then `write_content_object()` would be split up into archive/bare cases. In this world the `ostree_repo_write_content()` API would then need to hackily bridge pull to push and it'd be less efficient. Anyways for now due to this bifurcation, this API only works on non-archive repositories, but that's fine for now because that's what I want for the `ostree-ext-container` bits.
* repo: Add ostree_repo_write_symlinkColin Walters2021-04-081-0/+1
| | | | | | | Continuation of the addition of `ostree_repo_write_regfile_inline()`. This will be helpful for ostree-rs-ext and importing from tar, it's quite inefficient and awkward for small files to end up creating a whole `GInputStream` and `GFileInfo` and etc. for small files.
* repo: Add ostree_repo_write_regfile_inlineColin Walters2021-04-081-0/+14
| | | | | | | | | | | | | | | When working on ostree-ext and importing from tar, it's quite inefficient and awkward for small files to end up creating a whole `GInputStream` and `GFileInfo` and etc. for small files. Plus the gtk-rs binding API to map from `impl Read` to Gio https://docs.rs/gio/0.9.1/gio/struct.ReadInputStream.html requires that the input stream is `Send` but the Rust `tar` API isn't. This is only 1/3 of the problem; we also need similar APIs to directly create a symlink, and to stream large objects via a push-based API.
* Add SPDX-License-Identifier to source filesMarcus Folkesson2018-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SPDX License List is a list of (common) open source licenses that can be referred to by a “short identifier”. It has several advantages compared to the common "license header texts" usually found in source files. Some of the advantages: * It is precise; there is no ambiguity due to variations in license header text * It is language neutral * It is easy to machine process * It is concise * It is simple and can be used without much cost in interpreted environments like java Script, etc. * An SPDX license identifier is immutable. * It provides simple guidance for developers who want to make sure the license for their code is respected See http://spdx.org for further reading. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Closes: #1439 Approved by: cgwalters
* tests: More fixes for gjs testsColin Walters2017-07-211-1/+3
| | | | | | | | | | | | | | | | | Previous to this commit, the gjs tests were installed-only; and our logic for handling the "--enable-installed-tests=exclusive" logic actually also meant they weren't installed. It did work for me locally with `--enable-installed-tests`. However, to make things fully symmetric, let's enable the js tests to also be run under `make check`. Also remove `corrupt-repo-ref.js` from the PAPR invocation since it's not actually a unit test, it's a utility helper. Closes: #1022 Approved by: jlebon
* commit: Mark ostree_repo_transaction_set_ref* checksums nullableDan Nicholson2017-05-081-0/+14
| | | | | | | | Allow GI bindings to delete refs through ostree_repo_transaction_set_ref and ostree_repo_transaction_set_refspec by setting the checksum to NULL. Closes: #834 Approved by: cgwalters
* test-core.js: Add standard copyright headerColin Walters2013-09-181-0/+17
| | | | Like everything else.
* tests: Add a gjs-based testColin Walters2013-09-181-0/+38
This covers introspection, and in general is a much better way to get API coverage tests.