Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Jul 19, 2022
1 parent 74d8e32 commit 18b5e22
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 3 deletions.
36 changes: 35 additions & 1 deletion lib/modules/manager/cargo/__snapshots__/artifacts.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,41 @@ Array [
]
`;

exports[`modules/manager/cargo/artifacts returns updated Cargo.lock with docker 1`] = `Array []`;
exports[`modules/manager/cargo/artifacts returns updated Cargo.lock with docker 1`] = `
Array [
Object {
"cmd": "docker pull renovate/rust",
"options": Object {
"encoding": "utf-8",
},
},
Object {
"cmd": "docker ps --filter name=renovate_rust -aq",
"options": Object {
"encoding": "utf-8",
},
},
Object {
"cmd": "docker run --rm --name=renovate_rust --label=renovate_child -v \\"/tmp/github/some/repo\\":\\"/tmp/github/some/repo\\" -v \\"/tmp/cache\\":\\"/tmp/cache\\" -e BUILDPACK_CACHE_DIR -w \\"/tmp/github/some/repo\\" renovate/rust bash -l -c \\"cargo update --manifest-path Cargo.toml --workspace\\"",
"options": Object {
"cwd": "/tmp/github/some/repo",
"encoding": "utf-8",
"env": Object {
"BUILDPACK_CACHE_DIR": "/tmp/cache/buildpack",
"HOME": "/home/user",
"HTTPS_PROXY": "https://example.com",
"HTTP_PROXY": "http://example.com",
"LANG": "en_US.UTF-8",
"LC_ALL": "en_US",
"NO_PROXY": "localhost",
"PATH": "/tmp/path",
},
"maxBuffer": 10485760,
"timeout": 900000,
},
},
]
`;

exports[`modules/manager/cargo/artifacts returns updated workspace Cargo.lock 1`] = `
Array [
Expand Down
1 change: 1 addition & 0 deletions lib/modules/manager/cargo/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config: UpdateArtifactsConfig = {};
const adminConfig: RepoGlobalConfig = {
// `join` fixes Windows CI
localDir: join('/tmp/github/some/repo'),
cacheDir: join('/tmp/cache'),
};

describe('modules/manager/cargo/artifacts', () => {
Expand Down
72 changes: 70 additions & 2 deletions lib/modules/manager/poetry/__snapshots__/artifacts.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,77 @@ Array [
]
`;

exports[`modules/manager/poetry/artifacts returns updated poetry.lock using docker (constraints) 1`] = `Array []`;
exports[`modules/manager/poetry/artifacts returns updated poetry.lock using docker (constraints) 1`] = `
Array [
Object {
"cmd": "docker pull renovate/python:2.7.5",
"options": Object {
"encoding": "utf-8",
},
},
Object {
"cmd": "docker ps --filter name=renovate_python -aq",
"options": Object {
"encoding": "utf-8",
},
},
Object {
"cmd": "docker run --rm --name=renovate_python --label=renovate_child -v \\"/tmp/github/some/repo\\":\\"/tmp/github/some/repo\\" -v \\"/tmp/cache\\":\\"/tmp/cache\\" -e BUILDPACK_CACHE_DIR -w \\"/tmp/github/some/repo\\" renovate/python:2.7.5 bash -l -c \\"install-tool poetry 1.2.0 && poetry update --lock --no-interaction dep1\\"",
"options": Object {
"cwd": "/tmp/github/some/repo",
"encoding": "utf-8",
"env": Object {
"BUILDPACK_CACHE_DIR": "/tmp/cache/buildpack",
"HOME": "/home/user",
"HTTPS_PROXY": "https://example.com",
"HTTP_PROXY": "http://example.com",
"LANG": "en_US.UTF-8",
"LC_ALL": "en_US",
"NO_PROXY": "localhost",
"PATH": "/tmp/path",
},
"maxBuffer": 10485760,
"timeout": 900000,
},
},
]
`;

exports[`modules/manager/poetry/artifacts returns updated poetry.lock using docker 1`] = `Array []`;
exports[`modules/manager/poetry/artifacts returns updated poetry.lock using docker 1`] = `
Array [
Object {
"cmd": "docker pull renovate/python:3.4.2",
"options": Object {
"encoding": "utf-8",
},
},
Object {
"cmd": "docker ps --filter name=renovate_python -aq",
"options": Object {
"encoding": "utf-8",
},
},
Object {
"cmd": "docker run --rm --name=renovate_python --label=renovate_child -v \\"/tmp/github/some/repo\\":\\"/tmp/github/some/repo\\" -v \\"/tmp/cache\\":\\"/tmp/cache\\" -e BUILDPACK_CACHE_DIR -w \\"/tmp/github/some/repo\\" renovate/python:3.4.2 bash -l -c \\"install-tool poetry 1.2.0 && poetry update --lock --no-interaction dep1\\"",
"options": Object {
"cwd": "/tmp/github/some/repo",
"encoding": "utf-8",
"env": Object {
"BUILDPACK_CACHE_DIR": "/tmp/cache/buildpack",
"HOME": "/home/user",
"HTTPS_PROXY": "https://example.com",
"HTTP_PROXY": "http://example.com",
"LANG": "en_US.UTF-8",
"LC_ALL": "en_US",
"NO_PROXY": "localhost",
"PATH": "/tmp/path",
},
"maxBuffer": 10485760,
"timeout": 900000,
},
},
]
`;

exports[`modules/manager/poetry/artifacts returns updated poetry.lock when doing lockfile maintenance 1`] = `
Array [
Expand Down
1 change: 1 addition & 0 deletions lib/modules/manager/poetry/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const hostRules = mocked(_hostRules);

const adminConfig: RepoGlobalConfig = {
localDir: join('/tmp/github/some/repo'),
cacheDir: join('/tmp/cache'),
};

const config: UpdateArtifactsConfig = {};
Expand Down

0 comments on commit 18b5e22

Please sign in to comment.