Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/ecr v1.66.2
github.com/git-pkgs/archives v0.8.1
github.com/git-pkgs/artifacts v0.2.1
github.com/git-pkgs/cooldown v0.2.0
github.com/git-pkgs/cooldown v0.3.0
github.com/git-pkgs/enrichment v0.7.2
github.com/git-pkgs/gcs v0.1.0
github.com/git-pkgs/integrity v0.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ github.com/git-pkgs/archives v0.8.1 h1:IcT1bVsAec8SqJ4m9vTnD644KiadQZ4ERrWnm/30t
github.com/git-pkgs/archives v0.8.1/go.mod h1:gIyPXPQr5e+YrMqA5KQ7x6pLrFXHNF1+CjdedNJdGUU=
github.com/git-pkgs/artifacts v0.2.1 h1:VwdxR4yTDaqBZ34h0slxQBVyr2Xfa+QGOKCKviMx2xk=
github.com/git-pkgs/artifacts v0.2.1/go.mod h1:Otosgq52pXT5UNN7lh6s/lszpWKVDO8XrOjN1M70/IA=
github.com/git-pkgs/cooldown v0.2.0 h1:0MWPHtkzZgvCR0wdiQeyvMea/dxgw9tParH1zzaFopc=
github.com/git-pkgs/cooldown v0.2.0/go.mod h1:v7APuK/UouTiu8mWQZbdDmj7DfxxkGUeuhjaRB5gv9E=
github.com/git-pkgs/cooldown v0.3.0 h1:eAl2CQFwqXxluoVP9hHmropAf1VoV3gSxLMkN+NEu8A=
github.com/git-pkgs/cooldown v0.3.0/go.mod h1:FnTg8wufEALATC9Sm/9AHjLdA+u9eVn96e9BqXXjGB0=
github.com/git-pkgs/enrichment v0.7.2 h1:flD/M89HxkOegUi6tC8EOspFiIMsl7m0o576IQKOp48=
github.com/git-pkgs/enrichment v0.7.2/go.mod h1:xGyc/iz7u1UnbrOHk8lIX5ZaNF3mKFDEZc3VqBJ/LOk=
github.com/git-pkgs/gcs v0.1.0 h1:E3awGtsO0xZyHT9FUfEwMHjMkRxw41Bh+c7lgTmPvBo=
Expand Down
114 changes: 0 additions & 114 deletions internal/cooldownpolicy/policy.go

This file was deleted.

223 changes: 0 additions & 223 deletions internal/cooldownpolicy/policy_test.go

This file was deleted.

5 changes: 2 additions & 3 deletions internal/handler/cooldown_patterns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"time"

"github.com/git-pkgs/cooldown"
"github.com/git-pkgs/proxy/internal/cooldownpolicy"
)

func TestNuGetCooldownPackagePatterns(t *testing.T) {
Expand All @@ -26,7 +25,7 @@ func TestNuGetCooldownPackagePatterns(t *testing.T) {
} {
t.Run(tc.name, func(t *testing.T) {
p, db, store, fetcher := setupTestProxy(t)
policy, err := cooldownpolicy.New(&cooldown.Config{Default: tc.defaultDuration, Packages: tc.exact}, map[string]string{"pkg:nuget/test*": tc.pattern})
policy, err := cooldown.NewPolicy(&cooldown.Config{Default: tc.defaultDuration, Packages: tc.exact}, map[string]string{"pkg:nuget/test*": tc.pattern})
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -56,7 +55,7 @@ func TestNuGetCooldownPackagePatterns(t *testing.T) {
func TestNPMCooldownPatternExemptionRespectsDenylist(t *testing.T) {
p, db, store, fetcher := setupTestProxy(t)
var err error
p.Cooldown, err = cooldownpolicy.New(&cooldown.Config{Default: "7d"}, map[string]string{"pkg:npm/@example/*": "0"})
p.Cooldown, err = cooldown.NewPolicy(&cooldown.Config{Default: "7d"}, map[string]string{"pkg:npm/@example/*": "0"})
if err != nil {
t.Fatal(err)
}
Expand Down
Loading
Loading