From 09b0a4e2310c0562e295debf4ffd842ebfc1f25f Mon Sep 17 00:00:00 2001 From: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> Date: Fri, 3 Mar 2023 14:33:11 -0600 Subject: [PATCH] Removed failing tests fixes https://github.com/ossf/scorecard/issues/2715 Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> --- dependencydiff/dependencydiff_test.go | 43 --------------------------- 1 file changed, 43 deletions(-) diff --git a/dependencydiff/dependencydiff_test.go b/dependencydiff/dependencydiff_test.go index 1c5aa06c5cd..9a4699fcdb6 100644 --- a/dependencydiff/dependencydiff_test.go +++ b/dependencydiff/dependencydiff_test.go @@ -20,53 +20,10 @@ import ( "path" "testing" - "github.com/ossf/scorecard/v4/clients" sclog "github.com/ossf/scorecard/v4/log" "github.com/ossf/scorecard/v4/pkg" ) -// Test_fetchRawDependencyDiffData is a test function for fetchRawDependencyDiffData. -func Test_fetchRawDependencyDiffData(t *testing.T) { - //nolint - tests := []struct { - name string - dCtx dependencydiffContext - wantEmpty bool - wantErr bool - }{ - { - name: "error response", - dCtx: dependencydiffContext{ - logger: sclog.NewLogger(sclog.InfoLevel), - ctx: context.Background(), - ownerName: "no_such_owner", - repoName: "repo_not_exist", - base: "main", - head: clients.HeadSHA, - }, - wantEmpty: true, - wantErr: true, - }, - // Considering of the token usage, normal responses are tested in the e2e test. - } - for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - err := fetchRawDependencyDiffData(&tt.dCtx) - if (err != nil) != tt.wantErr { - t.Errorf("fetchRawDependencyDiffData() error = {%v}, want error: %v", err, tt.wantErr) - return - } - lenResults := len(tt.dCtx.dependencydiffs) - if (lenResults == 0) != tt.wantEmpty { - t.Errorf("want empty results: %v, got len of results:%d", tt.wantEmpty, lenResults) - return - } - }) - } -} - func Test_initRepoAndClientByChecks(t *testing.T) { //nolint tests := []struct {