Add unit tests for git repository functions
Review Request #7053 — Created March 12, 2015 and submitted
Information | |
---|---|
jyuen | |
rb-gateway | |
master | |
|
|
7104 | |
bb00723... | |
Reviewers | |
rb-gateway, students | |
Currently rb-gateway has no automated tests. This adds automated tests that checks against all functions in git_repository.go.
Made sure that all tests pass when running
go test
.
Description | From | Last Updated |
---|---|---|
If this is going to be a useful testing utility, maybe this should go in a seperate (testing.utils ?) package. |
|
|
If I run the tests on my mac, I get this: --- FAIL: TestGetPath (0.01s) git_repository_test.go:126: Expected '/var/folders/lp/dyp18_2s6bj05n25pm0k0_880000gn/T/rb-gateway574450298/', got '/private/var/folders/lp/dyp18_2s6bj05n25pm0k0_880000gn/T/rb-gateway574450298/' … |
|
|
All fake e-mail addresses should use "example.com" (which is reserved for tests and examples), rather than pointing to a real … |
|
Change Summary:
Add students group, dependency for #7054 (one test will fail without it)
Depends On: |
|
||
---|---|---|---|
Groups: |
|
-
-
git_repository_test.go (Diff revision 1) If this is going to be a useful testing utility, maybe this should go in a seperate (testing.utils ?) package.
Change Summary:
Separate check_fatal function from git_respository_test.go
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+349) |

-
Tool: Pyflakes Ignored Files: git_repository_test.go main_test.go README.md Tool: PEP8 Style Checker Ignored Files: git_repository_test.go main_test.go README.md
-
-
git_repository_test.go (Diff revision 2) If I run the tests on my mac, I get this:
--- FAIL: TestGetPath (0.01s) git_repository_test.go:126: Expected '/var/folders/lp/dyp18_2s6bj05n25pm0k0_880000gn/T/rb-gateway574450298/', got '/private/var/folders/lp/dyp18_2s6bj05n25pm0k0_880000gn/T/rb-gateway574450298/'
Which I think is happening because /var is a symbolic link to /private/var. Can you add a call to
filepath.EvalSymlinks
on the result ofTempDir
? -
git_repository_test.go (Diff revision 2) All fake e-mail addresses should use "example.com" (which is reserved for tests and examples), rather than pointing to a real website.
Change Summary:
Addressing David's suggestions
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+352) |