Merge branch 'master' into multi-cluster

This commit is contained in:
Nir Gazit
2021-01-20 10:10:09 +02:00
8 changed files with 36 additions and 18349 deletions
+11
View File
@@ -15,12 +15,23 @@
*/
export interface Config {
kafka?: {
/**
* Client ID used to Backstage uses to identify when connecting to the Kafka cluster.
*/
clientId: string;
clusters: {
name: string;
/**
* List of brokers in the Kafka cluster to connect to.
*/
brokers: string[];
/**
* Optional SSL connection parameters to connect to the cluster. Passed directly to Node tls.connect.
* See https://nodejs.org/dist/latest-v8.x/docs/api/tls.html#tls_tls_createsecurecontext_options
*/
ssl?: {
ca: string[];
/** @visibility secret */
key: string;
cert: string;
};
File diff suppressed because it is too large Load Diff
-1
View File
@@ -45,7 +45,6 @@
"@backstage/cli": "^0.4.3",
"@types/jest-when": "^2.7.2",
"@types/lodash": "^4.14.151",
"jest-extended": "^0.11.5",
"jest-when": "^3.1.0",
"supertest": "^4.0.2"
},
-23
View File
@@ -1,23 +0,0 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import '@backstage/backend-common';
describe('test', () => {
it('unbreaks the test runner', () => {
expect(true).toBeTruthy();
});
});
@@ -86,26 +86,29 @@ describe('router', () => {
expect(response.status).toEqual(200);
expect(response.body.consumerId).toEqual('hey');
expect(response.body.offsets).toIncludeSameMembers([
{
topic: 'topic1',
partitionId: 1,
groupOffset: '100',
topicOffset: '500',
},
{
topic: 'topic1',
partitionId: 2,
groupOffset: '213',
topicOffset: '1000',
},
{
topic: 'topic2',
partitionId: 1,
groupOffset: '456',
topicOffset: '456',
},
]);
// Note the Set comparison here since there's no guarantee on the order of the elements in the list.
expect(new Set(response.body.offsets)).toStrictEqual(
new Set([
{
topic: 'topic1',
partitionId: 1,
groupOffset: '100',
topicOffset: '500',
},
{
topic: 'topic1',
partitionId: 2,
groupOffset: '213',
topicOffset: '1000',
},
{
topic: 'topic2',
partitionId: 1,
groupOffset: '456',
topicOffset: '456',
},
]),
);
});
it('handles internal error correctly', async () => {
+1 -8
View File
@@ -14,11 +14,4 @@
* limitations under the License.
*/
import type { Config } from '@jest/types';
import 'jest-extended';
const config: Config.InitialOptions = {
setupFilesAfterEnv: ['jest-extended'],
};
export default config;
export {};