Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Fixes the broken e2e #1152

Merged
merged 5 commits into from
Oct 27, 2021
Merged

🌱 Fixes the broken e2e #1152

merged 5 commits into from
Oct 27, 2021

Conversation

naveensrinivasan
Copy link
Member

  • Please check if the PR fulfills these requirements
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    Bug fix

  • What is the current behavior? (You can also link to an open issue here)
    Fixes BUG: re-enable some e2e tests #861

  • What is the new behavior (if this is a feature change)?

    Fixes for broken e2e

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    None

  • Other information:

Fixes for broken e2e
@github-actions
Copy link

Integration tests success for e117b584484e48539e2980150cfb0e6ba170c5dd

@github-actions
Copy link

Integration tests success for 5879ea7e5aa1e86da79761281304f49e3483153f

@naveensrinivasan naveensrinivasan enabled auto-merge (rebase) October 22, 2021 16:30
@naveensrinivasan
Copy link
Member Author

Why are the unit tests failing? I haven't changed any of that code. cc @azeemshaikh38 @laurentsimon

@naveensrinivasan
Copy link
Member Author

Why are the unit tests failing? I haven't changed any of that code. cc @azeemshaikh38 @laurentsimon

Thanks, @cpanato for addressing the failing tests.

@github-actions
Copy link

Integration tests success for 60e9eed892839db258d3ea0a1577cf0cafc318cd

@cpanato
Copy link
Contributor

cpanato commented Oct 25, 2021

looks like the main branch is still failing https://github.com/ossf/scorecard/runs/3999368158?check_suite_focus=true

it is weird, running in my local machine all pass.
i will debug that tomorrow in my morning, if anyone did not fix before that

UPDATE

looks like if run using the make unit-test it flake in some tests

run 1:

$ make unit-test
# Run unit tests, ignoring e2e tests
go test -race -covermode atomic  `go list ./... | grep -v e2e`
?       github.com/ossf/scorecard/v3    [no test files]
?       github.com/ossf/scorecard/v3/checker    [no test files]
ok      github.com/ossf/scorecard/v3/checks     (cached)        coverage: 52.6% of statements
?       github.com/ossf/scorecard/v3/clients    [no test files]
ok      github.com/ossf/scorecard/v3/clients/githubrepo (cached)        coverage: 19.3% of statements
?       github.com/ossf/scorecard/v3/clients/githubrepo/roundtripper    [no test files]
?       github.com/ossf/scorecard/v3/clients/githubrepo/roundtripper/tokens     [no test files]
?       github.com/ossf/scorecard/v3/clients/githubrepo/roundtripper/tokens/server      [no test files]
?       github.com/ossf/scorecard/v3/clients/githubrepo/stats   [no test files]
?       github.com/ossf/scorecard/v3/clients/localdir   [no test files]
?       github.com/ossf/scorecard/v3/clients/mockrepo   [no test files]
?       github.com/ossf/scorecard/v3/cmd        [no test files]
?       github.com/ossf/scorecard/v3/cron/bq    [no test files]
ok      github.com/ossf/scorecard/v3/cron/config        (cached)        coverage: 58.3% of statements
?       github.com/ossf/scorecard/v3/cron/controller    [no test files]
ok      github.com/ossf/scorecard/v3/cron/data  (cached)        coverage: 34.7% of statements
--- FAIL: TestGetRepoURLs (0.00s)
    --- FAIL: TestGetRepoURLs/SkipEmpty (0.01s)
        main_test.go:176: testcase failed. expected [{host:github.com owner:owner1 repo:repo1 metadata:[meta1 meta2]} {host:github.com owner:owner2 repo:repo2 metadata:[meta3]}], got [{repoType:0 localDir:{path:} url:{host:github.com owner:owner2 repo:repo2} metadata:[meta3]} {repoType:0 localDir:{path:} url:{host:github.com owner:owner1 repo:repo1} metadata:[meta1 meta2]}]
    --- FAIL: TestGetRepoURLs/AddMetadata (0.01s)
        main_test.go:176: testcase failed. expected [{host:github.com owner:owner1 repo:repo1 metadata:[meta1 meta2]} {host:github.com owner:owner2 repo:repo2 metadata:[meta1]}], got [{repoType:0 localDir:{path:} url:{host:github.com owner:owner2 repo:repo2} metadata:[meta1]} {repoType:0 localDir:{path:} url:{host:github.com owner:owner1 repo:repo1} metadata:[meta1 meta2]}]
FAIL
coverage: 48.8% of statements
FAIL    github.com/ossf/scorecard/v3/cron/data/add      0.191s
?       github.com/ossf/scorecard/v3/cron/data/update   [no test files]
?       github.com/ossf/scorecard/v3/cron/data/validate [no test files]
ok      github.com/ossf/scorecard/v3/cron/format        (cached)        coverage: 46.2% of statements
?       github.com/ossf/scorecard/v3/cron/monitoring    [no test files]
ok      github.com/ossf/scorecard/v3/cron/pubsub        (cached)        coverage: 34.1% of statements
?       github.com/ossf/scorecard/v3/cron/webhook       [no test files]
?       github.com/ossf/scorecard/v3/cron/worker        [no test files]
?       github.com/ossf/scorecard/v3/docs/checks        [no test files]
?       github.com/ossf/scorecard/v3/docs/checks/internal       [no test files]
?       github.com/ossf/scorecard/v3/docs/checks/internal/generate      [no test files]
?       github.com/ossf/scorecard/v3/docs/checks/internal/validate      [no test files]
?       github.com/ossf/scorecard/v3/errors     [no test files]
ok      github.com/ossf/scorecard/v3/pkg        (cached)        coverage: 46.5% of statements
ok      github.com/ossf/scorecard/v3/policy     (cached)        coverage: 48.0% of statements
ok      github.com/ossf/scorecard/v3/repos      (cached)        coverage: 34.8% of statements
?       github.com/ossf/scorecard/v3/stats      [no test files]
?       github.com/ossf/scorecard/v3/utests     [no test files]
FAIL
make: *** [unit-test] Error 1

run 2:

$ make unit-test
# Run unit tests, ignoring e2e tests
go test -race -covermode atomic  `go list ./... | grep -v e2e`
?       github.com/ossf/scorecard/v3    [no test files]
?       github.com/ossf/scorecard/v3/checker    [no test files]
ok      github.com/ossf/scorecard/v3/checks     (cached)        coverage: 52.6% of statements
?       github.com/ossf/scorecard/v3/clients    [no test files]
ok      github.com/ossf/scorecard/v3/clients/githubrepo (cached)        coverage: 19.3% of statements
?       github.com/ossf/scorecard/v3/clients/githubrepo/roundtripper    [no test files]
?       github.com/ossf/scorecard/v3/clients/githubrepo/roundtripper/tokens     [no test files]
?       github.com/ossf/scorecard/v3/clients/githubrepo/roundtripper/tokens/server      [no test files]
?       github.com/ossf/scorecard/v3/clients/githubrepo/stats   [no test files]
?       github.com/ossf/scorecard/v3/clients/localdir   [no test files]
?       github.com/ossf/scorecard/v3/clients/mockrepo   [no test files]
?       github.com/ossf/scorecard/v3/cmd        [no test files]
?       github.com/ossf/scorecard/v3/cron/bq    [no test files]
ok      github.com/ossf/scorecard/v3/cron/config        (cached)        coverage: 58.3% of statements
?       github.com/ossf/scorecard/v3/cron/controller    [no test files]
ok      github.com/ossf/scorecard/v3/cron/data  (cached)        coverage: 34.7% of statements
--- FAIL: TestGetRepoURLs (0.00s)
    --- FAIL: TestGetRepoURLs/SkipLatest (0.00s)
        main_test.go:176: testcase failed. expected [{host:github.com owner:owner1 repo:repo1 metadata:[meta1 meta2]} {host:github.com owner:owner2 repo:repo2 metadata:[]}], got [{repoType:0 localDir:{path:} url:{host:github.com owner:owner2 repo:repo2} metadata:[]} {repoType:0 localDir:{path:} url:{host:github.com owner:owner1 repo:repo1} metadata:[meta1 meta2]}]
FAIL
coverage: 48.8% of statements
FAIL    github.com/ossf/scorecard/v3/cron/data/add      0.210s
?       github.com/ossf/scorecard/v3/cron/data/update   [no test files]
?       github.com/ossf/scorecard/v3/cron/data/validate [no test files]
ok      github.com/ossf/scorecard/v3/cron/format        (cached)        coverage: 46.2% of statements
?       github.com/ossf/scorecard/v3/cron/monitoring    [no test files]
ok      github.com/ossf/scorecard/v3/cron/pubsub        (cached)        coverage: 34.1% of statements
?       github.com/ossf/scorecard/v3/cron/webhook       [no test files]
?       github.com/ossf/scorecard/v3/cron/worker        [no test files]
?       github.com/ossf/scorecard/v3/docs/checks        [no test files]
?       github.com/ossf/scorecard/v3/docs/checks/internal       [no test files]
?       github.com/ossf/scorecard/v3/docs/checks/internal/generate      [no test files]
?       github.com/ossf/scorecard/v3/docs/checks/internal/validate      [no test files]
?       github.com/ossf/scorecard/v3/errors     [no test files]
ok      github.com/ossf/scorecard/v3/pkg        (cached)        coverage: 46.5% of statements
ok      github.com/ossf/scorecard/v3/policy     (cached)        coverage: 48.0% of statements
ok      github.com/ossf/scorecard/v3/repos      (cached)        coverage: 34.8% of statements
?       github.com/ossf/scorecard/v3/stats      [no test files]
?       github.com/ossf/scorecard/v3/utests     [no test files]
FAIL
make: *** [unit-test] Error 1

@github-actions
Copy link

Integration tests success for c386089d0b58f0a47d56c3a791f50b5e6ab93f7d

Copy link
Contributor

@laurentsimon laurentsimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Naveen!

@github-actions
Copy link

Integration tests success for c7045bde3b3241fd350b03afcd8d544353df575f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: re-enable some e2e tests
3 participants