mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
fix tests for golang 1.18
This commit is contained in:
parent
7189f340a9
commit
b952c99898
3 changed files with 8 additions and 2 deletions
|
|
@ -1 +1,5 @@
|
||||||
module golang-hello-world
|
module golang-hello-world
|
||||||
|
|
||||||
|
go 1.18
|
||||||
|
|
||||||
|
require github.com/BurntSushi/toml v1.1.0
|
||||||
|
|
|
||||||
2
testing/resources/golang_hooks_repo/go.sum
Normal file
2
testing/resources/golang_hooks_repo/go.sum
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||||
|
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
|
|
@ -667,7 +667,7 @@ def test_additional_golang_dependencies_installed(
|
||||||
path = make_repo(tempdir_factory, 'golang_hooks_repo')
|
path = make_repo(tempdir_factory, 'golang_hooks_repo')
|
||||||
config = make_config_from_repo(path)
|
config = make_config_from_repo(path)
|
||||||
# A small go package
|
# A small go package
|
||||||
deps = ['golang.org/x/example/hello']
|
deps = ['golang.org/x/example/hello@latest']
|
||||||
config['hooks'][0]['additional_dependencies'] = deps
|
config['hooks'][0]['additional_dependencies'] = deps
|
||||||
hook = _get_hook(config, store, 'golang-hook')
|
hook = _get_hook(config, store, 'golang-hook')
|
||||||
binaries = os.listdir(
|
binaries = os.listdir(
|
||||||
|
|
@ -688,7 +688,7 @@ def test_local_golang_additional_dependencies(store):
|
||||||
'name': 'hello',
|
'name': 'hello',
|
||||||
'entry': 'hello',
|
'entry': 'hello',
|
||||||
'language': 'golang',
|
'language': 'golang',
|
||||||
'additional_dependencies': ['golang.org/x/example/hello'],
|
'additional_dependencies': ['golang.org/x/example/hello@latest'],
|
||||||
}],
|
}],
|
||||||
}
|
}
|
||||||
hook = _get_hook(config, store, 'hello')
|
hook = _get_hook(config, store, 'hello')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue