Skip to content

Commit

Permalink
fix: bind govendor tests to specific version range
Browse files Browse the repository at this point in the history
  • Loading branch information
danlucian committed Nov 2, 2022
1 parent 161eb0c commit 5367507
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions test/system/system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@ if (goVersion[0] > 1 || goVersion[1] < 16) {
'expected-list.json'
);
});
}

test('install govendor', {timeout: 120 * 1000}, function () {
chdirToPkg([]);
return getGovendor();
});

test('prometheus 1.8', (t) => {
chdirToPkg(['github.com', 'prometheus']);
return clonePkg(
'https://github.com/prometheus/prometheus',
'v1.8.0',
'prometheus'
).then(function () {
const expectedPromDeps = isRunningOnWindows ? 'prometheus-ms-expected-list.json' : 'prometheus-unix-expected-list.json'
return testPkg(t,
['github.com', 'prometheus', 'prometheus', 'cmd', 'prometheus'],
['..', '..', 'vendor', 'vendor.json'].join(path.sep),
['..', '..', '..',
expectedPromDeps].join(path.sep)
);
test('install govendor', {timeout: 120 * 1000}, function () {
chdirToPkg([]);
return getGovendor();
});
});

test('prometheus 1.8', (t) => {
chdirToPkg(['github.com', 'prometheus']);
return clonePkg(
'https://github.com/prometheus/prometheus',
'v1.8.0',
'prometheus'
).then(function () {
const expectedPromDeps = isRunningOnWindows ? 'prometheus-ms-expected-list.json' : 'prometheus-unix-expected-list.json'
return testPkg(t,
['github.com', 'prometheus', 'prometheus', 'cmd', 'prometheus'],
['..', '..', 'vendor', 'vendor.json'].join(path.sep),
['..', '..', '..',
expectedPromDeps].join(path.sep)
);
});
});
}

function testPkg(t, pkgPathArray, targetFile, expectedPkgsListFile) {
chdirToPkg(pkgPathArray);
Expand Down

0 comments on commit 5367507

Please sign in to comment.