summaryrefslogtreecommitdiff
path: root/tests/test-repo-finder-config.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2020-08-01 18:47:36 +0000
committerColin Walters <walters@verbum.org>2020-08-02 12:54:11 +0000
commitf3c7834f1e41e07990528e951d3d98c1e150db2b (patch)
treed66991198875c76431364f335bb9b43421afc939 /tests/test-repo-finder-config.c
parenta5409b872ff23571b42bc55de4a85117fae00a6a (diff)
downloadostree-f3c7834f1e41e07990528e951d3d98c1e150db2b.tar.gz
tests/repo-finder: Explicitly commit empty dir
We were committing the whole tempdir, which seems to fail in Travis because the GPG agent Unix domain socket ends up there too, and ostree refuses to commit sockets.
Diffstat (limited to 'tests/test-repo-finder-config.c')
-rw-r--r--tests/test-repo-finder-config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test-repo-finder-config.c b/tests/test-repo-finder-config.c
index 0a2e9e60..ead9e907 100644
--- a/tests/test-repo-finder-config.c
+++ b/tests/test-repo-finder-config.c
@@ -173,6 +173,9 @@ assert_create_remote (Fixture *fixture,
glnx_shutil_mkdir_p_at (fixture->tmpdir.fd, repo_name, 0700, NULL, &error);
g_assert_no_error (error);
+ glnx_shutil_mkdir_p_at (fixture->tmpdir.fd, "empty", 0700, NULL, &error);
+ g_assert_no_error (error);
+
g_autoptr(GFile) repo_path = g_file_get_child (fixture->working_dir, repo_name);
g_autoptr(OstreeRepo) repo = ostree_repo_new (repo_path);
ostree_repo_set_collection_id (repo, collection_id, &error);
@@ -193,7 +196,7 @@ assert_create_remote (Fixture *fixture,
g_autoptr(OstreeRepoFile) repo_file = NULL;
mtree = ostree_mutable_tree_new ();
- ostree_repo_write_dfd_to_mtree (repo, AT_FDCWD, ".", mtree, NULL, NULL, &error);
+ ostree_repo_write_dfd_to_mtree (repo, fixture->tmpdir.fd, "empty", mtree, NULL, NULL, &error);
g_assert_no_error (error);
ostree_repo_write_mtree (repo, mtree, (GFile **) &repo_file, NULL, &error);
g_assert_no_error (error);