mirror of
https://github.com/gomods/athens
synced 2026-02-03 14:20:31 +00:00
* add module fetch and fetchers
* Breaking module ref out of the fetcher
* disk ref in progress
* very broken go get fetcher
* refactoring ref and fixing up the disk ref
* adding a test for the disk ref
* doing test setup right
* passing version
* fixing syntax err
* removing raw format string
in favor of a function that does the same thing
* removing obsolete godoc
* removing the switch in favor of nested if statements
hopefully this is easier to read
* passing data into the format strings
* refactoring the closer
* creating and looking for files in the root
* genericFetcher => goGetFetcher
* remove the clear method on go get fetcher
the ref returned from fetch does it
* remove unnecessary call to isVgoInstalled
calls to fetch will fail if vgo is not installed
* remove unneeded dirName
* adding preliminary test for the go get fetcher
* adding a test for fetch
* executing fetch test
* adding docs and simplifying the fetcher
* declaring the storage version up front
* fixing the source path
* creating test files in a separate function
* closing files immediately
instead of aggregating them for later. whaaat was I thinking???
* passing context into storage driver
* not closing the source file
* not putting the module name in quotes anymore
* adding a warning about deleting the package
* adding go binary name
* embedding github API limit error
* check files in the success path
* passing errors up
not just messages
* doh
* using vgo for the go get fetcher tests
* not using multierror because it's unneeded
* less code 😄
* custom error
* removing unused import
* return noop refs
* adding link to issue for the TODO
* simplifying
* simplifying moar!
* using config.FmtModVer
* simplifying
* defer closing the zip
* closing the zip
* adding comment about closing the ver.Zip
* GO_BINARY_NAME => GO_BINARY_PATH
* using errors pkg
* fixing compile err
* removing redundant args
* removing requirement that caller calls Clear on fetch error
* fixing build
* fix
* adding masterminds semver
* returning better error
and checking version format
* removing unused error
* using proper semver function
* fixin compile err
* rm that shizz
31 lines
564 B
Go
31 lines
564 B
Go
package module
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/gobuffalo/envy"
|
|
"github.com/spf13/afero"
|
|
"github.com/stretchr/testify/suite"
|
|
)
|
|
|
|
const (
|
|
// these values need to point to a real repository that has a tag
|
|
repoURI = "github.com/arschles/assert"
|
|
version = "v1.0.0"
|
|
)
|
|
|
|
type ModuleSuite struct {
|
|
suite.Suite
|
|
fs afero.Fs
|
|
goBinaryName string
|
|
}
|
|
|
|
func (m *ModuleSuite) SetupTest() {
|
|
m.fs = afero.NewMemMapFs()
|
|
}
|
|
|
|
func TestModules(t *testing.T) {
|
|
goBinaryPath := envy.Get("GO_BINARY_PATH", "go")
|
|
suite.Run(t, &ModuleSuite{goBinaryName: goBinaryPath})
|
|
}
|