Merge pull request #6804 from backstage/techdocs-common/fix-azure-storage-test

[TechdocsCommon] Fix Azure  Blob Storage Tests
This commit is contained in:
Camila Belo
2021-08-12 15:41:58 +02:00
committed by GitHub
@@ -175,12 +175,15 @@ describe('publishing with valid credentials', () => {
directory: wrongPathToGeneratedDirectory,
});
await expect(fails).rejects.toThrow(
/Unable to upload file\(s\) to Azure. Error: Failed to read template directory: ENOENT, no such file or directory/,
);
await expect(fails).rejects.toThrow(
new RegExp(wrongPathToGeneratedDirectory),
);
await expect(fails).rejects.toMatchObject({
message: expect.stringContaining(
'Unable to upload file(s) to Azure. Error: Failed to read template directory: ENOENT, no such file or directory',
),
});
await expect(fails).rejects.toMatchObject({
message: expect.stringContaining(wrongPathToGeneratedDirectory),
});
});
it('reports an error when bad account credentials', async () => {