From be0a17b82a1aa81d0d04c1c5a1f3dcbf50aaa761 Mon Sep 17 00:00:00 2001 From: Jehandad Kamal Date: Tue, 15 Jun 2021 11:50:34 +0500 Subject: [PATCH] update(readme): add steps for configuring tests --- README.md | 2 +- github_test.go | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2d17a4f..4324d7b 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ $ go get -u github.com/tcnksm/ghr 2. Create a feature branch 3. Commit your changes 4. Rebase your local changes against the master branch -5. Run test suite with the `make test` command and confirm that it passes +5. Run test suite with the `make test` command and confirm that it passes using correct variables e.g. `GITHUB_TOKEN=$GITHUB_TOKEN TEST_REPO_OWNER=tcnksm TEST_REPO_NAME=ghr make test` 6. Run `gofmt -s -w .` 7. Create new Pull Request diff --git a/github_test.go b/github_test.go index 55b3fa3..9ff8e79 100644 --- a/github_test.go +++ b/github_test.go @@ -26,13 +26,11 @@ var ( ) func TestMain(m *testing.M) { - owner := os.Getenv(EnvRepoOwner) - if owner != "" { + if owner := os.Getenv(EnvRepoOwner); owner != "" { TestOwner = owner } - repo := os.Getenv(EnvRepoName) - if repo != "" { + if repo := os.Getenv(EnvRepoName); repo != "" { TestRepo = repo }