catalog-backend: couple of cleanups and fixes
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -27,7 +27,6 @@ exports.up = async function up(knex) {
|
||||
.comment(
|
||||
'An opaque key that uniquely identifies the location of an entity in order to support conflict resolution',
|
||||
);
|
||||
// table.index(['location_key'], 'refresh_state_location_key_idx');
|
||||
});
|
||||
};
|
||||
|
||||
@@ -37,6 +36,5 @@ exports.up = async function up(knex) {
|
||||
exports.down = async function down(knex) {
|
||||
await knex.schema.alterTable('refresh_state', table => {
|
||||
table.dropColumn('location_key');
|
||||
// table.dropIndex([], 'refresh_state_location_key_idx');
|
||||
});
|
||||
};
|
||||
|
||||
@@ -48,11 +48,14 @@ describe('DefaultLocationServiceTest', () => {
|
||||
},
|
||||
deferredEntities: [
|
||||
{
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Component',
|
||||
metadata: {
|
||||
name: 'bar',
|
||||
entity: {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Component',
|
||||
metadata: {
|
||||
name: 'bar',
|
||||
},
|
||||
},
|
||||
locationKey: 'file:///tmp/mock.yaml',
|
||||
},
|
||||
],
|
||||
relations: [],
|
||||
|
||||
@@ -92,7 +92,6 @@ export class DefaultLocationService implements LocationService {
|
||||
});
|
||||
|
||||
if (processed.ok) {
|
||||
// todo
|
||||
unprocessedEntities.push(...processed.deferredEntities);
|
||||
entities.push(processed.completedEntity);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user