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

🌱 Removed failing tests #2718

Merged
merged 1 commit into from
Mar 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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