Граф коммитов

25 Коммитов

Автор SHA1 Сообщение Дата
Mislav Marohnić fab4e042fe Preserve order of hosts in hub config file
This fixes the seemingly random order of hosts in the interactive prompt
on `hub init -g`, `hub clone`, etc.
2019-01-02 18:27:50 +01:00
Alexander Pakulov 0eb76ff86f Separate config and tests for unix-socket 2018-08-24 10:34:07 -07:00
Alexander Pakulov 3dc759c182 Test coverage 2018-08-23 08:45:27 -07:00
Mislav Marohnić bec1441133 fmt 2018-06-12 00:36:41 +02:00
Mislav Marohnić 485523ac42 Blank out `XDG_CONFIG_*` variables in Go tests
Ref. 839a5f38f2
2018-06-12 00:22:10 +02:00
Mislav Marohnić 76a97b4b43 Simplify test repo setup & teardown 2018-06-12 00:21:09 +02:00
ganmacs 9144e1df31 Add template tests 2016-05-30 12:49:53 -07:00
Nick LaMuro a1e49b89a9 Add GeneratePRTemplate method to github/template
The function of this method is to defer the logic of generating a commit
message to template.go, and eventually remove that logic from
commands/pull_request.go

Also adds tests for this new method, which also modifies the
fixtures/test_repo.go file to accomidate a test repo with a `.github` PR
dir.
2016-05-30 12:49:53 -07:00
Madhusudan.C.S 29317d283e Add unit tests for git.Remotes() and github.Remotes().
Also, define AddRemote() method for test Repo fixture.
2015-11-02 15:55:05 -08:00
Jingwen Owen Ou 7b55582ee8 Rename environment variables starting with `GH_` to `HUB_` 2015-01-20 21:59:04 -08:00
Jingwen Owen Ou c5ed2474ad Rewrite release command in a modular way 2014-12-24 21:25:59 -08:00
Jingwen Owen Ou 4cb663a968 Rename `Cmd.ExecOutput` to `Cmd.CombinedOutput` to avoid confusion
We now have `Cmd.Spawn` and `Cmd.Exec`, to avoid confusion, we use `Cmd.CombinedOutput` for combined output.
2014-11-30 12:16:53 -08:00
Jingwen Owen Ou 44d1fa7f48 Fix Go tests on Windows
A couple of Go tests failure on Windows, fix code or tests to make them green:

--- FAIL: TestSaveAlwaysReportOption (0.15 seconds)
panic: remove C:\Users\IEUser\AppData\Local\Temp\test-repo999546479\test.git: Th
e process cannot access the file because it is being used by another process. [r
ecovered]
        panic: remove C:\Users\IEUser\AppData\Local\Temp\test-repo999546479\test
.git: The process cannot access the file because it is being used by another pro
cess.

--- FAIL: TestRunnerCallCommands (0.00 seconds)
        assert.go:15: V:/src/github.com/github/hub/commands/runner_test.go:42
        assert.go:24: ! 0 != 1

--- FAIL: TestEditor_openAndEdit_deleteFileWhenOpeningEditorFails (0.00 seconds)
        assert.go:15: V:/src/github.com/github/hub/github/editor_test.go:34
        assert.go:36: !  Failure

--- FAIL: TestGitHubRepo_OriginRemote (0.16 seconds)
        assert.go:15: V:/src/github.com/github/hub/github/localrepo_test.go:18
        assert.go:24: ! "V:\\src\\github.com\\github\\hub\\fixtures\\test.git" !
= "ssh://V/%5Csrc%5Cgithub.com%5Cgithub%5Chub%5Cfixtures%5Ctest.git"
2014-11-20 19:36:32 -08:00
Jingwen Owen Ou 13a84381d5 Turns out Host is an array for the YAML format 2014-09-16 09:59:43 -07:00
Jingwen Owen Ou 0f60c59615 Load yaml config 2014-09-16 09:59:43 -07:00
Jingwen Owen Ou 2c3fe4c745 Support `protocol` option in config file
Defaults to HTTPS, but can be used to configure Enterprise instances
which are only accessible over HTTP.
2014-04-15 15:53:38 +02:00
Jingwen Owen Ou 2990ab4a64 Set $HOME when testing git so that it's not messing with local settings 2014-02-12 07:59:02 -08:00
Jingwen Owen Ou 0d33dc972f Explain more on pwd 2014-02-11 05:52:48 -08:00
Jingwen Owen Ou c8e12e9e62 More comments on caching pwd 2014-02-10 23:52:39 -08:00
Jingwen Owen Ou a8b1a8d099 Add test.git 2014-02-10 23:41:05 -08:00
Jingwen Owen Ou d7a7ba4ce4 Remove test.git 2014-02-10 23:17:42 -08:00
Jingwen Owen Ou 12751d5be8 Clone test repo instead of querying on top of it 2014-02-10 12:51:35 -08:00
Jingwen Owen Ou 0477058672 Extract to fixtures.SetupTestRepo() 2014-02-10 11:48:54 -08:00
Jingwen Owen Ou 6e590438d6 Fix git related tests
Make tests less fragile by introducing a test git repo
2014-02-10 08:36:27 -08:00
Jingwen Owen Ou 5f234aa2fd Test unzipExecutable 2014-01-01 09:55:50 -08:00