diff --git a/lib/workers/repository/process/lookup/index.spec.ts b/lib/workers/repository/process/lookup/index.spec.ts index 8b51b703121926a27f2f15b199e9a4f4f97e0a89..3c4b49507f366b9506cc15dbee9877c31b7390c0 100644 --- a/lib/workers/repository/process/lookup/index.spec.ts +++ b/lib/workers/repository/process/lookup/index.spec.ts @@ -1747,20 +1747,36 @@ describe('workers/repository/process/lookup/index', () => { it('applies versionCompatibility for 18.10.0', async () => { config.currentValue = '18.10.0-alpine'; + config.currentDigest = 'aaa111'; config.packageName = 'node'; config.versioning = nodeVersioningId; config.versionCompatibility = '^(?<version>[^-]+)(?<compatibility>-.*)?$'; config.datasource = DockerDatasource.id; getDockerReleases.mockResolvedValueOnce({ releases: [ + { version: '18.10.0' }, { version: '18.18.0' }, { version: '18.19.0-alpine' }, { version: '18.20.0' }, ], }); + getDockerDigest.mockResolvedValueOnce('bbb222'); + getDockerDigest.mockResolvedValueOnce('ccc333'); const res = await lookup.lookupUpdates(config); + expect(res.updates).toHaveLength(2); expect(res).toMatchObject({ - updates: [{ newValue: '18.19.0-alpine', updateType: 'minor' }], + updates: [ + { + newValue: '18.19.0-alpine', + newDigest: 'bbb222', + updateType: 'minor', + }, + { + newValue: '18.10.0-alpine', + newDigest: 'ccc333', + updateType: 'digest', + }, + ], }); }); diff --git a/lib/workers/repository/process/lookup/index.ts b/lib/workers/repository/process/lookup/index.ts index 6e6273069e32fa954c955cbc8c31766f2d2e104f..d061bf8fec6e24d0dab165b5e28859ebb1ee6b51 100644 --- a/lib/workers/repository/process/lookup/index.ts +++ b/lib/workers/repository/process/lookup/index.ts @@ -419,8 +419,7 @@ export async function lookupUpdates( // digest update res.updates.push({ updateType: 'digest', - // TODO #22198 - newValue: config.currentValue!, + newValue: compareValue, }); } } else if (config.pinDigests) {