Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3917 from cloudfoundry-incubator/fix-unit-tests
Browse files Browse the repository at this point in the history
Fix cf summary unit test failures
  • Loading branch information
KlapTrap committed Sep 24, 2019
2 parents 05d8cea + 2a081d8 commit 97257b0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';
import { EffectsModule } from '@ngrx/effects';

import { generateASEntities } from '../../cf-autoscaler/src/store/autoscaler-entity-generator';
import { generateStratosEntities } from '../../core/src/base-entity-types';
import { CATALOGUE_ENTITIES, EntityCatalogueFeatureModule } from '../../core/src/core/entity-catalogue.module';
import { entityCatalogue, TestEntityCatalogue } from '../../core/src/core/entity-catalogue/entity-catalogue.service';
Expand All @@ -23,7 +24,8 @@ import { CloudFoundryStoreModule } from './store/cloud-foundry.store.module';
testEntityCatalogue.clear();
return [
...generateCFEntities(),
...generateStratosEntities()
...generateStratosEntities(),
...generateASEntities(), // FIXME: CF should not depend on autoscaler. See #3916
];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@ describe('CloudFoundrySummaryTabComponent', () => {
beforeEach(
async(() => {
TestBed.configureTestingModule({
declarations: [CloudFoundrySummaryTabComponent, CardCfInfoComponent, CardCfRecentAppsComponent, CompactAppCardComponent],
declarations: [
CloudFoundrySummaryTabComponent,
CardCfInfoComponent,
CardCfRecentAppsComponent,
CompactAppCardComponent
],
imports: generateCfBaseTestModules(),
providers: [...generateTestCfEndpointServiceProvider(), TabNavService]
providers: [
...generateTestCfEndpointServiceProvider(),
TabNavService
]
}).compileComponents();
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,17 @@ describe('CardCfInfoComponent', () => {
beforeEach(
async(() => {
TestBed.configureTestingModule({
declarations: [CardCfInfoComponent, MetadataItemComponent, BooleanIndicatorComponent],
declarations: [
CardCfInfoComponent,
MetadataItemComponent,
BooleanIndicatorComponent
],
imports: generateCfBaseTestModulesNoShared(),
providers: [generateTestCfEndpointService(), UserInviteService, ConfirmationDialogService]
providers: [
generateTestCfEndpointService(),
UserInviteService,
ConfirmationDialogService
]
}).compileComponents();
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class CardCfInfoComponent implements OnInit, OnDestroy {
map(entity => this.getDescription(entity))
);

// FIXME: CF should not depend on autoscaler. See #3916
this.autoscalerVersion$ = fetchAutoscalerInfo(this.cfEndpointService.cfGuid, this.esf).pipe(
map(e => e.entityRequestInfo.error ?
null :
Expand Down

0 comments on commit 97257b0

Please sign in to comment.