diff options
author | Michael Muré <batolettre@gmail.com> | 2018-12-10 23:19:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-10 23:19:46 +0100 |
commit | c92da552d8caeb6129f6f97146459498ac316387 (patch) | |
tree | 12b024669d5b4c188b18bf9598082e8915d65c28 | |
parent | 63807382d345d93a939c8ffb8bed04fa2a840f66 (diff) | |
parent | 8dcd3d21cd5e1bf0312225a0db9506173ea76fc7 (diff) | |
download | git-bug-c92da552d8caeb6129f6f97146459498ac316387.tar.gz |
Merge pull request #81 from rafasc/ra/fix-empty-ident-test-failure
tests: configure user ident in repos used by tests
-rw-r--r-- | bug/bug_actions_test.go | 7 | ||||
-rw-r--r-- | commands/select/select_test.go | 7 | ||||
-rw-r--r-- | tests/read_bugs_test.go | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/bug/bug_actions_test.go b/bug/bug_actions_test.go index e68132fc..a60e5c68 100644 --- a/bug/bug_actions_test.go +++ b/bug/bug_actions_test.go @@ -31,6 +31,13 @@ func createRepo(bare bool) *repository.GitRepo { log.Fatal(err) } + if err := repo.StoreConfig("user.name", "testuser"); err != nil { + log.Fatal("failed to set user.name for test repository: ", err) + } + if err := repo.StoreConfig("user.email", "testuser@example.com"); err != nil { + log.Fatal("failed to set user.email for test repository: ", err) + } + return repo } diff --git a/commands/select/select_test.go b/commands/select/select_test.go index 79c8cbf0..fe501d76 100644 --- a/commands/select/select_test.go +++ b/commands/select/select_test.go @@ -96,6 +96,13 @@ func createRepo() *repository.GitRepo { log.Fatal(err) } + if err := repo.StoreConfig("user.name", "testuser"); err != nil { + log.Fatal("failed to set user.name for test repository: ", err) + } + if err := repo.StoreConfig("user.email", "testuser@example.com"); err != nil { + log.Fatal("failed to set user.email for test repository: ", err) + } + return repo } diff --git a/tests/read_bugs_test.go b/tests/read_bugs_test.go index b28da49b..e5de0cc2 100644 --- a/tests/read_bugs_test.go +++ b/tests/read_bugs_test.go @@ -31,6 +31,13 @@ func createRepo(bare bool) *repository.GitRepo { log.Fatal(err) } + if err := repo.StoreConfig("user.name", "testuser"); err != nil { + log.Fatal("failed to set user.name for test repository: ", err) + } + if err := repo.StoreConfig("user.email", "testuser@example.com"); err != nil { + log.Fatal("failed to set user.email for test repository: ", err) + } + return repo } |