Add unit tests for git repository functions
Review Request #7053 — Created March 12, 2015 and submitted
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. |
brennie | |
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/' … |
david | |
All fake e-mail addresses should use "example.com" (which is reserved for tests and examples), rather than pointing to a real … |
david |
- Change Summary:
-
Add students group, dependency for #7054 (one test will fail without it)
- Depends On:
-
- Groups:
- Change Summary:
-
Separate check_fatal function from git_respository_test.go
- Commit:
-
ef5f71b71bd55c3571bf2532c6f9d8e527c9c550b72c4c115d543811a226bd37e66ac9f6d87098b7
-
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
-
-
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
? -
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:
-
b72c4c115d543811a226bd37e66ac9f6d87098b7bb00723dcafd47a7f9747dd36d84346fe6ad4c6a