-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regression in loading old index.yaml (#684)
* Add regression test. * Fix regression in loading old index.yaml, reported as microsoft/vcpkg-ce-catalog#33
- Loading branch information
1 parent
a55d274
commit a9fce49
Showing
4 changed files
with
63 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { Session } from '@microsoft/vcpkg-ce/dist/session'; | ||
import { strict } from 'assert'; | ||
import { SuiteLocal } from './SuiteLocal'; | ||
|
||
async function testRegistry(session: Session, sha: string) { | ||
const uri = `https://github.com/microsoft/vcpkg-ce-catalog/archive/${sha}.zip`; | ||
const loaded = await session.loadRegistry(uri); | ||
strict.ok(loaded); | ||
await loaded.load(); | ||
} | ||
|
||
describe('Regressions', () => { | ||
const local = new SuiteLocal(); | ||
|
||
after(local.after.bind(local)); | ||
|
||
// These 2 registry loads ensure that we can process both the 'old' and 'new' index.yaml files | ||
// regression discovered in https://github.com/microsoft/vcpkg-ce-catalog/pull/33 | ||
|
||
it('Loads 2ffbc04d6856a1d03c5de0ab94404f90636f7855 registry', async () => { | ||
await testRegistry(local.session, '2ffbc04d6856a1d03c5de0ab94404f90636f7855'); | ||
}); | ||
|
||
it('Loads d471612be63b2fb506ab5f47122da460f5aa4d30 registry', async () => { | ||
await testRegistry(local.session, 'd471612be63b2fb506ab5f47122da460f5aa4d30'); | ||
}); | ||
}); |