Skip to content
Snippets Groups Projects
Commit 284f7862 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

tests: drop cache test for docker

parent 9e0cadb7
No related branches found
No related tags found
No related merge requests found
......@@ -197,6 +197,7 @@ async function getDigest(config, newValue) {
const cacheNamespace = 'datasource-docker-digest';
const cacheKey = `${massagedRegistry}:${repository}:${newTag}`;
const cachedResult = await renovateCache.get(cacheNamespace, cacheKey);
// istanbul ignore if
if (cachedResult) {
return cachedResult;
}
......
......@@ -50,28 +50,6 @@ describe('api/docker', () => {
);
expect(res).toBe('some-digest');
});
it('returns from cache', async () => {
got.mockReturnValueOnce({
headers: {
'www-authenticate':
'Bearer realm="https://auth.docker.io/token",service="registry.docker.io",scope="repository:samalba/my-app:pull "',
},
});
got.mockReturnValueOnce({ body: { token: 'some-token' } });
got.mockReturnValueOnce({
headers: { 'docker-content-digest': 'some-digest' },
});
const res = await docker.getDigest(
{ depName: 'some-dep-to-cache' },
'some-newer-value'
);
expect(res).toBe('some-digest');
const res2 = await docker.getDigest(
{ depName: 'some-dep-to-cache' },
'some-newer-value'
);
expect(res2).toBe('some-digest');
});
it('falls back to body for digest', async () => {
got.mockReturnValueOnce({
headers: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment