dd8e306e31
When our go.mod file was introduced in commit 114e85c2002091eb415040923d872f8e4a4bc636 in PR #3208, the module path chosen did not include a trailing /v2 component. However, the Go modules specification now advises that module paths must have a "major version suffix" which matches the release version. We therefore add a /v2 suffix to our module path and all its instances in import paths. See also https://golang.org/ref/mod#major-version-suffixes for details regarding the Go module system's major version suffix rule.
15 lines
307 B
Go
15 lines
307 B
Go
package git_test // to avoid import cycles
|
|
|
|
import (
|
|
"testing"
|
|
|
|
. "github.com/git-lfs/git-lfs/v2/git"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestReadOnlyConfig(t *testing.T) {
|
|
cfg := NewReadOnlyConfig("", "")
|
|
_, err := cfg.SetLocal("lfs.this.should", "fail")
|
|
assert.Equal(t, err, ErrReadOnly)
|
|
}
|