@@ -2,7 +2,7 @@ import { codeBlock } from 'common-tags';
22import { join } from 'upath' ;
33import { mockDeep } from 'vitest-mock-extended' ;
44import { envMock , mockExecAll } from '../../../../test/exec-util' ;
5- import { env , fs , git , mocked , partial } from '../../../../test/util' ;
5+ import { env , fs , git , partial } from '../../../../test/util' ;
66import { GlobalConfig } from '../../../config/global' ;
77import type { RepoGlobalConfig } from '../../../config/types' ;
88import * as docker from '../../../util/exec/docker' ;
@@ -31,9 +31,9 @@ vi.mock('./artifacts-extra', () => mockDeep());
3131
3232process . env . CONTAINERBASE = 'true' ;
3333
34- const datasource = mocked ( _datasource ) ;
35- const hostRules = mocked ( _hostRules ) ;
36- const artifactsExtra = mocked ( _artifactsExtra ) ;
34+ const datasource = vi . mocked ( _datasource ) ;
35+ const hostRules = vi . mocked ( _hostRules ) ;
36+ const artifactsExtra = vi . mocked ( _artifactsExtra ) ;
3737
3838const gomod1 = codeBlock `
3939 module github.com/renovate-tests/gomod1
@@ -1820,7 +1820,6 @@ describe('modules/manager/gomod/artifacts', () => {
18201820 it ( 'updates import paths with specific tool version from constraint' , async ( ) => {
18211821 fs . readLocalFile . mockResolvedValueOnce ( 'Current go.sum' ) ;
18221822 fs . readLocalFile . mockResolvedValueOnce ( null ) ; // vendor modules filename
1823- fs . readLocalFile . mockResolvedValueOnce ( 'go.mod file' ) ;
18241823 const execSnapshots = mockExecAll ( ) ;
18251824 git . getRepoStatus . mockResolvedValueOnce (
18261825 partial < StatusResult > ( {
@@ -1879,7 +1878,6 @@ describe('modules/manager/gomod/artifacts', () => {
18791878 it ( 'updates import paths with latest tool version on invalid version constraint' , async ( ) => {
18801879 fs . readLocalFile . mockResolvedValueOnce ( 'Current go.sum' ) ;
18811880 fs . readLocalFile . mockResolvedValueOnce ( null ) ; // vendor modules filename
1882- fs . readLocalFile . mockResolvedValueOnce ( 'go.mod file' ) ;
18831881 const execSnapshots = mockExecAll ( ) ;
18841882 git . getRepoStatus . mockResolvedValueOnce (
18851883 partial < StatusResult > ( {
@@ -1997,7 +1995,6 @@ describe('modules/manager/gomod/artifacts', () => {
19971995 GlobalConfig . set ( { ...adminConfig , binarySource : 'install' } ) ;
19981996 fs . readLocalFile . mockResolvedValueOnce ( 'Current go.sum' ) ;
19991997 fs . readLocalFile . mockResolvedValueOnce ( null ) ; // vendor modules filename
2000- fs . readLocalFile . mockResolvedValueOnce ( null ) ;
20011998 const execSnapshots = mockExecAll ( ) ;
20021999 git . getRepoStatus . mockResolvedValueOnce (
20032000 partial < StatusResult > ( {
@@ -2056,7 +2053,6 @@ describe('modules/manager/gomod/artifacts', () => {
20562053 GlobalConfig . set ( { ...adminConfig , binarySource : 'docker' } ) ;
20572054 fs . readLocalFile . mockResolvedValueOnce ( 'Current go.sum' ) ;
20582055 fs . readLocalFile . mockResolvedValueOnce ( null ) ; // vendor modules filename
2059- fs . readLocalFile . mockResolvedValueOnce ( 'someText\n\ngo 1.17\n\n' ) ;
20602056 const execSnapshots = mockExecAll ( ) ;
20612057 git . getRepoStatus . mockResolvedValueOnce (
20622058 partial < StatusResult > ( {
@@ -2075,7 +2071,7 @@ describe('modules/manager/gomod/artifacts', () => {
20752071 updatedDeps : [
20762072 { depName : 'github.com/google/go-github/v24' , newVersion : 'v28.0.0' } ,
20772073 ] ,
2078- newPackageFileContent : gomod1 ,
2074+ newPackageFileContent : `someText\n\ngo 1.17\n\n ${ gomod1 } ` ,
20792075 config : {
20802076 updateType : 'major' ,
20812077 postUpdateOptions : [ 'gomodUpdateImportPaths' ] ,
@@ -2130,7 +2126,6 @@ describe('modules/manager/gomod/artifacts', () => {
21302126 GlobalConfig . set ( { ...adminConfig , binarySource : 'docker' } ) ;
21312127 fs . readLocalFile . mockResolvedValueOnce ( 'Current go.sum' ) ;
21322128 fs . readLocalFile . mockResolvedValueOnce ( null ) ; // vendor modules filename
2133- fs . readLocalFile . mockResolvedValueOnce ( 'someText\n\ngo 1.17\n\n' ) ;
21342129 mockExecAll ( ) ;
21352130 git . getRepoStatus . mockResolvedValueOnce (
21362131 partial < StatusResult > ( {
0 commit comments