From b952c99898bacea651b4e39c8be57d987f64c094 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Wed, 13 Apr 2022 17:52:55 -0400 Subject: [PATCH] fix tests for golang 1.18 --- testing/resources/golang_hooks_repo/go.mod | 4 ++++ testing/resources/golang_hooks_repo/go.sum | 2 ++ tests/repository_test.py | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 testing/resources/golang_hooks_repo/go.sum diff --git a/testing/resources/golang_hooks_repo/go.mod b/testing/resources/golang_hooks_repo/go.mod index 523bfc9f..f37d4b67 100644 --- a/testing/resources/golang_hooks_repo/go.mod +++ b/testing/resources/golang_hooks_repo/go.mod @@ -1 +1,5 @@ module golang-hello-world + +go 1.18 + +require github.com/BurntSushi/toml v1.1.0 diff --git a/testing/resources/golang_hooks_repo/go.sum b/testing/resources/golang_hooks_repo/go.sum new file mode 100644 index 00000000..ec0c385a --- /dev/null +++ b/testing/resources/golang_hooks_repo/go.sum @@ -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= diff --git a/tests/repository_test.py b/tests/repository_test.py index 5c7909c5..cfa69c9f 100644 --- a/tests/repository_test.py +++ b/tests/repository_test.py @@ -667,7 +667,7 @@ def test_additional_golang_dependencies_installed( path = make_repo(tempdir_factory, 'golang_hooks_repo') config = make_config_from_repo(path) # A small go package - deps = ['golang.org/x/example/hello'] + deps = ['golang.org/x/example/hello@latest'] config['hooks'][0]['additional_dependencies'] = deps hook = _get_hook(config, store, 'golang-hook') binaries = os.listdir( @@ -688,7 +688,7 @@ def test_local_golang_additional_dependencies(store): 'name': 'hello', 'entry': 'hello', 'language': 'golang', - 'additional_dependencies': ['golang.org/x/example/hello'], + 'additional_dependencies': ['golang.org/x/example/hello@latest'], }], } hook = _get_hook(config, store, 'hello')