chenyulin0719 commented on code in PR #146:
URL: https://github.com/apache/yunikorn-web/pull/146#discussion_r1423465339
##########
src/app/services/scheduler/scheduler.service.spec.ts:
##########
@@ -20,25 +20,84 @@ import {HttpClientTestingModule} from
'@angular/common/http/testing';
import {TestBed} from '@angular/core/testing';
import {EnvconfigService} from '@app/services/envconfig/envconfig.service';
import {MockEnvconfigService} from '@app/testing/mocks';
-import {configureTestSuite} from 'ng-bullet';
import {SchedulerService} from './scheduler.service';
+import {SchedulerResourceInfo} from '@app/models/resource-info.model';
+import {NOT_AVAILABLE} from '@app/utils/constants';
describe('SchedulerService', () => {
let service: SchedulerService;
- configureTestSuite(() => {
+ beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
providers: [SchedulerService, { provide: EnvconfigService, useValue:
MockEnvconfigService }],
});
- });
-
- beforeEach(() => {
service = TestBed.inject(SchedulerService);
});
it('should create the service', () => {
expect(service).toBeTruthy();
+
+ });
+
+ it('should format SchedulerResourceInfo correctly', () => {
+ type TestCase = {
+ description: string;
+ schedulerResourceInfo: SchedulerResourceInfo;
+ expected: string;
+ };
+
+ const testCases: TestCase[] = [
+ {
+ description: 'test simple resourceInfo',
+ schedulerResourceInfo: {
+ memory: 1024,
+ vcore: 2,
Review Comment:
Align to 'memory', 'vcore'. (e52527271f4c703105d7e1c2bac27ffa67bdcd1a)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]