Skip to content

Commit

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

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
Signed-off-by: Shofiya2003 <shofiyabootwala@gmail.com>
  • Loading branch information
naveensrinivasan authored and Shofiya2003 committed Mar 10, 2023
1 parent b1a28d9 commit a3ba489
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions dependencydiff/dependencydiff_test.go
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 a3ba489

Please sign in to comment.