feat(auth): Implement HMAC-SHA256 OCI JWTs; enhance PyPI & RubyGems uploads and normalize responses
This commit is contained in:
@@ -99,7 +99,7 @@ tap.test('PyPI: should retrieve Simple API root index HTML (GET /simple/)', asyn
|
||||
});
|
||||
|
||||
expect(response.status).toEqual(200);
|
||||
expect(response.headers['Content-Type']).toEqual('text/html');
|
||||
expect(response.headers['Content-Type']).toStartWith('text/html');
|
||||
expect(response.body).toBeTypeOf('string');
|
||||
|
||||
const html = response.body as string;
|
||||
@@ -125,8 +125,10 @@ tap.test('PyPI: should retrieve Simple API root index JSON (GET /simple/ with Ac
|
||||
const json = response.body as any;
|
||||
expect(json).toHaveProperty('meta');
|
||||
expect(json).toHaveProperty('projects');
|
||||
expect(json.projects).toBeTypeOf('object');
|
||||
expect(json.projects).toHaveProperty(normalizedPackageName);
|
||||
expect(json.projects).toBeInstanceOf(Array);
|
||||
// Check that the package is in the projects list (PEP 691 format: array of { name } objects)
|
||||
const packageNames = json.projects.map((p: any) => p.name);
|
||||
expect(packageNames).toContain(normalizedPackageName);
|
||||
});
|
||||
|
||||
tap.test('PyPI: should retrieve Simple API package HTML (GET /simple/{package}/)', async () => {
|
||||
@@ -140,7 +142,7 @@ tap.test('PyPI: should retrieve Simple API package HTML (GET /simple/{package}/)
|
||||
});
|
||||
|
||||
expect(response.status).toEqual(200);
|
||||
expect(response.headers['Content-Type']).toEqual('text/html');
|
||||
expect(response.headers['Content-Type']).toStartWith('text/html');
|
||||
expect(response.body).toBeTypeOf('string');
|
||||
|
||||
const html = response.body as string;
|
||||
|
||||
Reference in New Issue
Block a user