chore: remove unused logger

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2022-10-18 14:16:06 +02:00
parent a7607b5413
commit c11ab0f35b
3 changed files with 3 additions and 7 deletions
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import { getVoidLogger } from '../logging';
import { UrlReaderPredicateMux } from './UrlReaderPredicateMux';
describe('UrlReaderPredicateMux', () => {
@@ -32,7 +31,7 @@ describe('UrlReaderPredicateMux', () => {
search: jest.fn(),
};
const mux = new UrlReaderPredicateMux(getVoidLogger());
const mux = new UrlReaderPredicateMux();
mux.register({
predicate: url => url.hostname === 'foo',
reader: fooReader,
@@ -62,7 +61,7 @@ describe('UrlReaderPredicateMux', () => {
});
it('throws an error if no predicate matches', async () => {
const mux = new UrlReaderPredicateMux(getVoidLogger());
const mux = new UrlReaderPredicateMux();
await expect(mux.readUrl('http://foo/1')).rejects.toThrow(
/^Reading from 'http:\/\/foo\/1' is not allowed. You may/,
@@ -15,7 +15,6 @@
*/
import { NotAllowedError } from '@backstage/errors';
import { Logger } from 'winston';
import {
ReadTreeOptions,
ReadTreeResponse,
@@ -42,8 +41,6 @@ function notAllowedMessage(url: string) {
export class UrlReaderPredicateMux implements UrlReader {
private readonly readers: UrlReaderPredicateTuple[] = [];
constructor(private readonly logger: Logger) {}
register(tuple: UrlReaderPredicateTuple): void {
this.readers.push(tuple);
}
@@ -55,7 +55,7 @@ export class UrlReaders {
*/
static create(options: UrlReadersOptions): UrlReader {
const { logger, config, factories } = options;
const mux = new UrlReaderPredicateMux(logger);
const mux = new UrlReaderPredicateMux();
const treeResponseFactory = DefaultReadTreeResponseFactory.create({
config,
});