Skip to content

tests: Add create__symbolic_with_arbitrary_content#4138

Merged
ethomson merged 2 commits intolibgit2:masterfrom
richardipsum:symbolic-create-arbitrary-tgt-test
Feb 26, 2017
Merged

tests: Add create__symbolic_with_arbitrary_content#4138
ethomson merged 2 commits intolibgit2:masterfrom
richardipsum:symbolic-create-arbitrary-tgt-test

Conversation

@richardipsum
Copy link
Copy Markdown
Contributor

This test ensures that it's possible to create a symbolic ref that
has arbitrary data as its target. It also ensures it's possible
to obtain the target of that symbolic reference from the git_reference
object.

@ethomson
Copy link
Copy Markdown
Member

The AppVeyor mingw builds are busted at the moment. I'm looking into it; please ignore build failures from those hosts for now.

@ethomson
Copy link
Copy Markdown
Member

Looks good; only one minor problem: we want to make sure to turn GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION back to its default after this test runs.

Can you add:

cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, 1));

to the cleanup routine in test_refs_create__cleanup?

Thanks!

This test ensures that it's possible to create a symbolic ref that
has arbitrary data as its target. It also ensures it's possible
to obtain the target of that symbolic reference from the git_reference
object.
Use C style comments as per style guide,
and fix mismatching indentation.
@richardipsum richardipsum force-pushed the symbolic-create-arbitrary-tgt-test branch from e7214ce to b84e58f Compare February 25, 2017 14:33
@richardipsum
Copy link
Copy Markdown
Contributor Author

I noticed some whitespace/style issues while I was doing that so I fixed them up and tacked them on as an extra commit.

For what it's worth while rerunning the test suite locally, just to be sure, I notice that the clar tests fail if run via the Makefile but not when run directly, this happens on master as well so I'm pretty sure it's unrelated to my changes.

I have some free time today so I might check out why that's happening.

@richardipsum
Copy link
Copy Markdown
Contributor Author

I think the tests are failing due to networking issues at my end, so nothing to worry about. I needed to do some googling to figure out how to get the tests to print the exact failure to the screen without manually modifying the generated Makefile. I've submitted #4139 to add a note to the README on how to do this.

@ethomson
Copy link
Copy Markdown
Member

Cool, thanks! 😀

@ethomson ethomson merged commit a4b5ac6 into libgit2:master Feb 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants