Skip to content

Commit

Permalink
🌱 Removed failing tests (#2718)
Browse files Browse the repository at this point in the history
fixes #2715

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
  • Loading branch information
naveensrinivasan authored Mar 3, 2023
1 parent b8bc65f commit c06ac74
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions dependencydiff/dependencydiff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c06ac74

Please sign in to comment.