yay/pkg/vcs/mock.go
Jo f8e7891b0b
refactor(vcs): remove mux and use interface for other packages (#1859)
* refactor(vcs): remove context passing mutex from VCS interface

* simplify devel upgrade gather

* update vcs upgrade tests

* remove unused mock
2022-12-18 16:37:15 +00:00

31 lines
490 B
Go

package vcs
import (
"context"
gosrc "github.com/Morganamilo/go-srcinfo"
)
type Mock struct {
OriginsByPackage map[string]OriginInfoByURL
ToUpgradeReturn []string
}
func (m *Mock) ToUpgrade(ctx context.Context) []string {
return m.ToUpgradeReturn
}
func (m *Mock) Update(ctx context.Context, pkgName string, sources []gosrc.ArchString) {
}
func (m *Mock) Save() error {
return nil
}
func (m *Mock) RemovePackage(pkgs []string) {
}
func (m *Mock) Load() error {
return nil
}