Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable12] Include empty directories in the default state of acceptance tests #11285

Conversation

danxuliu
Copy link
Member

Backport of #11268

Before each scenario of the acceptance tests is run the Nextcloud server
is reset to a default state. To do this the full directory of the
Nextcloud server is commited to a local Git repository and then reset to
that commit when needed.

Unfortunately, Git does not support including empty directories in a
commit. Due to this, when the default state was restored, it could
happen that the file cache listed an empty directory that did not exist
because it was not properly restored (for example,
"data/appdata_*/css/icons"), and that in turn could lead to an error
when the directory was used.

Currently the only way to force Git to include an empty directory is to
add a dummy file to the directory (so it will no longer be empty,
but that should not be a problem in the affected directories, even if
the dummy file is not included in the file cache); although Git FAQ
suggests using a ".gitignore" file a ".keep" file was used instead, as
it conveys better its purpose.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added bug 3. to review Waiting for reviews labels Sep 19, 2018
@danxuliu danxuliu added this to the Nextcloud 12.0.12 milestone Sep 19, 2018
@danxuliu danxuliu requested review from blizzz and skjnldsv September 19, 2018 11:05
@rullzer rullzer merged commit 4a14e98 into stable12 Sep 25, 2018
@MorrisJobke MorrisJobke deleted the stable12-11268-include-empty-directories-in-the-default-state-of-acceptance-tests branch October 1, 2018 09:04
@MorrisJobke MorrisJobke mentioned this pull request Oct 3, 2018
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants