Fix review suggestions

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
This commit is contained in:
Vadim Markovtsev
2017-10-26 15:37:18 +02:00
parent 250519bb51
commit c97a180da5
3 changed files with 25 additions and 13 deletions

View File

@ -15,6 +15,7 @@ import (
)
const linguistURL = "https://github.com/github/linguist.git"
const linguistClonedEnvVar = "ENRY_TEST_REPO"
type EnryTestSuite struct {
suite.Suite
@ -29,8 +30,8 @@ func TestEnryTestSuite(t *testing.T) {
func (s *EnryTestSuite) SetupSuite() {
var err error
s.repoLinguist = os.Getenv("ENRY_TEST_REPO")
s.cloned = len(s.repoLinguist) == 0
s.repoLinguist = os.Getenv(linguistClonedEnvVar)
s.cloned = s.repoLinguist == ""
if s.cloned {
s.repoLinguist, err = ioutil.TempDir("", "linguist-")
assert.NoError(s.T(), err)