Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

PR checks on Travis do not have GH API token defined  #3024

@agajdosi

Description

@agajdosi

General information

Test environment on PR build misses GH API token, which causes that some unit tests are skipped and thus the coverage report is lower than it is with token defined.

Expected

Test environments on Master and PR builds are the same.

Actual

PR environment does not have GitHub API token defined, thus tests using GH API will fail or will be skipped, making the coverage and test results different than on Master build.

Master branch

=== RUN   TestDownloadOc
-- Downloading OpenShift binary 'oc' version 'v1.3.1'
-- Downloading OpenShift v1.3.1 checksums ... OK-- Downloading OpenShift binary 'oc' version 'v1.3.1'
-- Downloading OpenShift v1.3.1 checksums ... OK-- Downloading OpenShift binary 'oc' version 'v1.3.1'
-- Downloading OpenShift v1.3.1 checksums ... OK--- PASS: TestDownloadOc (5.89s)
=== RUN   TestInvalidVersion
--- PASS: TestInvalidVersion (0.08s)
=== RUN   TestInvalidBinaryFormat
--- PASS: TestInvalidBinaryFormat (0.10s)
=== RUN   Test_Download_Oc_1_4_1
-- Downloading OpenShift binary 'oc' version 'v1.4.1'
-- Downloading OpenShift v1.4.1 checksums ... OK--- PASS: Test_Download_Oc_1_4_1 (2.42s)
PASS
coverage: 76.2% of statements
ok  	github.com/minishift/minishift/pkg/util/github	9.047s	coverage: 76.2% of statements

PR branch:

=== RUN   TestDownloadOc
--- SKIP: TestDownloadOc (0.00s)
	github_test.go:176: Skipping GitHub API based test, because no access token is defined in the environment.
		 To run this test check https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/ and set for example MINISHIFT_GITHUB_API_TOKEN (see github.go).
=== RUN   TestInvalidVersion
--- SKIP: TestInvalidVersion (0.00s)
	github_test.go:176: Skipping GitHub API based test, because no access token is defined in the environment.
		 To run this test check https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/ and set for example MINISHIFT_GITHUB_API_TOKEN (see github.go).
=== RUN   TestInvalidBinaryFormat
--- SKIP: TestInvalidBinaryFormat (0.00s)
	github_test.go:176: Skipping GitHub API based test, because no access token is defined in the environment.
		 To run this test check https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/ and set for example MINISHIFT_GITHUB_API_TOKEN (see github.go).
=== RUN   Test_Download_Oc_1_4_1
--- SKIP: Test_Download_Oc_1_4_1 (0.00s)
	github_test.go:176: Skipping GitHub API based test, because no access token is defined in the environment.
		 To run this test check https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/ and set for example MINISHIFT_GITHUB_API_TOKEN (see github.go).
PASS
coverage: 5.5% of statements
ok  	github.com/minishift/minishift/pkg/util/github	0.006s	coverage: 5.5% of statements

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions