mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-02 07:03:35 +01:00
Implement replication service interface
This commit is contained in:
parent
54df5ec053
commit
e3929f0e95
@ -5,11 +5,13 @@ import { SharedModule } from '../shared/shared.module';
|
|||||||
import { SERVICE_CONFIG, IServiceConfig } from '../service.config';
|
import { SERVICE_CONFIG, IServiceConfig } from '../service.config';
|
||||||
|
|
||||||
describe('AccessLogService', () => {
|
describe('AccessLogService', () => {
|
||||||
beforeEach(() => {
|
const mockConfig: IServiceConfig = {
|
||||||
const mockConfig:IServiceConfig = {
|
logBaseEndpoint: "/api/logs/testing"
|
||||||
logBaseEndpoint:"/api/logs/testing"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let config: IServiceConfig;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
SharedModule
|
SharedModule
|
||||||
@ -19,14 +21,22 @@ describe('AccessLogService', () => {
|
|||||||
{
|
{
|
||||||
provide: AccessLogService,
|
provide: AccessLogService,
|
||||||
useClass: AccessLogDefaultService
|
useClass: AccessLogDefaultService
|
||||||
},{
|
}, {
|
||||||
provide: SERVICE_CONFIG,
|
provide: SERVICE_CONFIG,
|
||||||
useValue: mockConfig
|
useValue: mockConfig
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
config = TestBed.get(SERVICE_CONFIG);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be initialized', inject([AccessLogDefaultService], (service: AccessLogService) => {
|
it('should be initialized', inject([AccessLogDefaultService], (service: AccessLogService) => {
|
||||||
expect(service).toBeTruthy();
|
expect(service).toBeTruthy();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should inject the right config', () => {
|
||||||
|
expect(config).toBeTruthy();
|
||||||
|
expect(config.logBaseEndpoint).toEqual("/api/logs/testing");
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* @interface Base
|
* @interface Base
|
||||||
*/
|
*/
|
||||||
export interface Base {
|
export interface Base {
|
||||||
id?: string;
|
id?: string | number;
|
||||||
name?: string;
|
name?: string;
|
||||||
creation_time?: Date;
|
creation_time?: Date;
|
||||||
update_time?: Date;
|
update_time?: Date;
|
||||||
@ -80,7 +80,18 @@ export interface Endpoint extends Base { }
|
|||||||
* @export
|
* @export
|
||||||
* @interface ReplicationRule
|
* @interface ReplicationRule
|
||||||
*/
|
*/
|
||||||
export interface ReplicationRule { }
|
export interface ReplicationRule extends Base {
|
||||||
|
project_id: number;
|
||||||
|
project_name: string;
|
||||||
|
target_id: number;
|
||||||
|
target_name: string;
|
||||||
|
enabled: number;
|
||||||
|
description?: string;
|
||||||
|
cron_str?: string;
|
||||||
|
start_time?: Date;
|
||||||
|
error_job_count?: number;
|
||||||
|
deleted: number;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for replication job.
|
* Interface for replication job.
|
||||||
@ -88,7 +99,13 @@ export interface ReplicationRule { }
|
|||||||
* @export
|
* @export
|
||||||
* @interface ReplicationJob
|
* @interface ReplicationJob
|
||||||
*/
|
*/
|
||||||
export interface ReplicationJob { }
|
export interface ReplicationJob extends Base {
|
||||||
|
status: string;
|
||||||
|
repository: string;
|
||||||
|
policy_id: number;
|
||||||
|
operation: string;
|
||||||
|
tags: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for access log.
|
* Interface for access log.
|
||||||
|
@ -1,20 +1,43 @@
|
|||||||
import { TestBed, inject } from '@angular/core/testing';
|
import { TestBed, inject } from '@angular/core/testing';
|
||||||
|
|
||||||
import { ReplicationService, ReplicationDefaultService } from './replication.service';
|
import { ReplicationService, ReplicationDefaultService } from './replication.service';
|
||||||
|
import { SharedModule } from '../shared/shared.module';
|
||||||
|
import { SERVICE_CONFIG, IServiceConfig } from '../service.config';
|
||||||
|
|
||||||
describe('ReplicationService', () => {
|
describe('ReplicationService', () => {
|
||||||
|
const mockConfig: IServiceConfig = {
|
||||||
|
replicationRuleEndpoint: "/api/policies/replication/testing",
|
||||||
|
replicationJobEndpoint: "/api/jobs/replication/testing"
|
||||||
|
};
|
||||||
|
|
||||||
|
let config: IServiceConfig;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
|
imports: [
|
||||||
|
SharedModule
|
||||||
|
],
|
||||||
providers: [
|
providers: [
|
||||||
ReplicationDefaultService,
|
ReplicationDefaultService,
|
||||||
{
|
{
|
||||||
provide: ReplicationService,
|
provide: ReplicationService,
|
||||||
useClass: ReplicationDefaultService
|
useClass: ReplicationDefaultService
|
||||||
|
}, {
|
||||||
|
provide: SERVICE_CONFIG,
|
||||||
|
useValue: mockConfig
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
config = TestBed.get(SERVICE_CONFIG);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be initialized', inject([ReplicationDefaultService], (service: ReplicationService) => {
|
it('should be initialized', inject([ReplicationDefaultService], (service: ReplicationService) => {
|
||||||
expect(service).toBeTruthy();
|
expect(service).toBeTruthy();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should inject the right config', () => {
|
||||||
|
expect(config).toBeTruthy();
|
||||||
|
expect(config.replicationRuleEndpoint).toEqual("/api/policies/replication/testing");
|
||||||
|
expect(config.replicationJobEndpoint).toEqual("/api/jobs/replication/testing");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
import { RequestQueryParams } from './RequestQueryParams';
|
import { RequestQueryParams } from './RequestQueryParams';
|
||||||
import { ReplicationJob, ReplicationRule } from './interface';
|
import { ReplicationJob, ReplicationRule } from './interface';
|
||||||
import { Injectable } from "@angular/core";
|
import { Injectable, Inject } from "@angular/core";
|
||||||
import 'rxjs/add/observable/of';
|
import 'rxjs/add/observable/of';
|
||||||
|
import { Http, RequestOptions } from '@angular/http';
|
||||||
|
import { SERVICE_CONFIG, IServiceConfig } from '../service.config';
|
||||||
|
import { buildHttpRequestOptions, HTTP_JSON_OPTIONS } from '../utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the service methods to handle the replication (rule and job) related things.
|
* Define the service methods to handle the replication (rule and job) related things.
|
||||||
@ -22,77 +25,77 @@ export abstract class ReplicationService {
|
|||||||
* @param {(number | string)} [projectId]
|
* @param {(number | string)} [projectId]
|
||||||
* @param {string} [ruleName]
|
* @param {string} [ruleName]
|
||||||
* @param {RequestQueryParams} [queryParams]
|
* @param {RequestQueryParams} [queryParams]
|
||||||
* @returns {(Observable<ReplicationRule[]> | ReplicationRule[])}
|
* @returns {(Observable<ReplicationRule[]> | Promise<ReplicationRule[]> | ReplicationRule[])}
|
||||||
*
|
*
|
||||||
* @memberOf ReplicationService
|
* @memberOf ReplicationService
|
||||||
*/
|
*/
|
||||||
abstract getReplicationRules(projectId?: number | string, ruleName?: string, queryParams?: RequestQueryParams): Observable<ReplicationRule[]> | ReplicationRule[];
|
abstract getReplicationRules(projectId?: number | string, ruleName?: string, queryParams?: RequestQueryParams): Observable<ReplicationRule[]> | Promise<ReplicationRule[]> | ReplicationRule[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the specified replication rule.
|
* Get the specified replication rule.
|
||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {(number | string)} ruleId
|
* @param {(number | string)} ruleId
|
||||||
* @returns {(Observable<ReplicationRule> | ReplicationRule)}
|
* @returns {(Observable<ReplicationRule> | Promise<ReplicationRule> | ReplicationRule)}
|
||||||
*
|
*
|
||||||
* @memberOf ReplicationService
|
* @memberOf ReplicationService
|
||||||
*/
|
*/
|
||||||
abstract getReplicationRule(ruleId: number | string): Observable<ReplicationRule> | ReplicationRule;
|
abstract getReplicationRule(ruleId: number | string): Observable<ReplicationRule> | Promise<ReplicationRule> | ReplicationRule;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new replication rule.
|
* Create new replication rule.
|
||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {ReplicationRule} replicationRule
|
* @param {ReplicationRule} replicationRule
|
||||||
* @returns {(Observable<any> | any)}
|
* @returns {(Observable<any> | Promise<any> | any)}
|
||||||
*
|
*
|
||||||
* @memberOf ReplicationService
|
* @memberOf ReplicationService
|
||||||
*/
|
*/
|
||||||
abstract createReplicationRule(replicationRule: ReplicationRule): Observable<any> | any;
|
abstract createReplicationRule(replicationRule: ReplicationRule): Observable<any> | Promise<any> | any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the specified replication rule.
|
* Update the specified replication rule.
|
||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {ReplicationRule} replicationRule
|
* @param {ReplicationRule} replicationRule
|
||||||
* @returns {(Observable<any> | any)}
|
* @returns {(Observable<any> | Promise<any> | any)}
|
||||||
*
|
*
|
||||||
* @memberOf ReplicationService
|
* @memberOf ReplicationService
|
||||||
*/
|
*/
|
||||||
abstract updateReplicationRule(replicationRule: ReplicationRule): Observable<any> | any;
|
abstract updateReplicationRule(replicationRule: ReplicationRule): Observable<any> | Promise<any> | any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the specified replication rule.
|
* Delete the specified replication rule.
|
||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {(number | string)} ruleId
|
* @param {(number | string)} ruleId
|
||||||
* @returns {(Observable<any> | any)}
|
* @returns {(Observable<any> | Promise<any> | any)}
|
||||||
*
|
*
|
||||||
* @memberOf ReplicationService
|
* @memberOf ReplicationService
|
||||||
*/
|
*/
|
||||||
abstract deleteReplicationRule(ruleId: number | string): Observable<any> | any;
|
abstract deleteReplicationRule(ruleId: number | string): Observable<any> | Promise<any> | any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable the specified replication rule.
|
* Enable the specified replication rule.
|
||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {(number | string)} ruleId
|
* @param {(number | string)} ruleId
|
||||||
* @returns {(Observable<any> | any)}
|
* @returns {(Observable<any> | Promise<any> | any)}
|
||||||
*
|
*
|
||||||
* @memberOf ReplicationService
|
* @memberOf ReplicationService
|
||||||
*/
|
*/
|
||||||
abstract enableReplicationRule(ruleId: number | string): Observable<any> | any;
|
abstract enableReplicationRule(ruleId: number | string): Observable<any> | Promise<any> | any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disable the specified replication rule.
|
* Disable the specified replication rule.
|
||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {(number | string)} ruleId
|
* @param {(number | string)} ruleId
|
||||||
* @returns {(Observable<any> | any)}
|
* @returns {(Observable<any> | Promise<any> | any)}
|
||||||
*
|
*
|
||||||
* @memberOf ReplicationService
|
* @memberOf ReplicationService
|
||||||
*/
|
*/
|
||||||
abstract disableReplicationRule(ruleId: number | string): Observable<any> | any;
|
abstract disableReplicationRule(ruleId: number | string): Observable<any> | Promise<any> | any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the jobs for the specified replication rule.
|
* Get the jobs for the specified replication rule.
|
||||||
@ -106,11 +109,11 @@ export abstract class ReplicationService {
|
|||||||
* @abstract
|
* @abstract
|
||||||
* @param {(number | string)} ruleId
|
* @param {(number | string)} ruleId
|
||||||
* @param {RequestQueryParams} [queryParams]
|
* @param {RequestQueryParams} [queryParams]
|
||||||
* @returns {(Observable<ReplicationJob> | ReplicationJob)}
|
* @returns {(Observable<ReplicationJob> | Promise<ReplicationJob[]> | ReplicationJob)}
|
||||||
*
|
*
|
||||||
* @memberOf ReplicationService
|
* @memberOf ReplicationService
|
||||||
*/
|
*/
|
||||||
abstract getJobs(ruleId: number | string, queryParams?: RequestQueryParams): Observable<ReplicationJob[]> | ReplicationJob[];
|
abstract getJobs(ruleId: number | string, queryParams?: RequestQueryParams): Observable<ReplicationJob[]> | Promise<ReplicationJob[]> | ReplicationJob[];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,35 +126,121 @@ export abstract class ReplicationService {
|
|||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ReplicationDefaultService extends ReplicationService {
|
export class ReplicationDefaultService extends ReplicationService {
|
||||||
public getReplicationRules(projectId?: number | string, ruleName?: string, queryParams?: RequestQueryParams): Observable<ReplicationRule[]> | ReplicationRule[] {
|
_ruleBaseUrl: string;
|
||||||
return Observable.of([]);
|
_jobBaseUrl: string;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private http: Http,
|
||||||
|
@Inject(SERVICE_CONFIG) private config: IServiceConfig
|
||||||
|
) {
|
||||||
|
super();
|
||||||
|
this._ruleBaseUrl = this.config.replicationRuleEndpoint ?
|
||||||
|
this.config.replicationRuleEndpoint : '/api/policies/replication';
|
||||||
|
this._jobBaseUrl = this.config.replicationJobEndpoint ?
|
||||||
|
this.config.replicationJobEndpoint : '/api/jobs/replication';
|
||||||
}
|
}
|
||||||
|
|
||||||
public getReplicationRule(ruleId: number | string): Observable<ReplicationRule> | ReplicationRule {
|
//Private methods
|
||||||
return Observable.of({});
|
//Check if the rule object is valid
|
||||||
|
_isValidRule(rule: ReplicationRule): boolean {
|
||||||
|
return rule !== undefined && rule != null && rule.name !== undefined && rule.name.trim() !== '' && rule.target_id !== 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public createReplicationRule(replicationRule: ReplicationRule): Observable<any> | any {
|
public getReplicationRules(projectId?: number | string, ruleName?: string, queryParams?: RequestQueryParams): Observable<ReplicationRule[]> | Promise<ReplicationRule[]> | ReplicationRule[] {
|
||||||
return Observable.of({});
|
if (!queryParams) {
|
||||||
|
queryParams = new RequestQueryParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateReplicationRule(replicationRule: ReplicationRule): Observable<any> | any {
|
if (projectId) {
|
||||||
return Observable.of({});
|
queryParams.set('project_id', '' + projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public deleteReplicationRule(ruleId: number | string): Observable<any> | any {
|
if (ruleName) {
|
||||||
return Observable.of({});
|
queryParams.set('name', ruleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public enableReplicationRule(ruleId: number | string): Observable<any> | any {
|
return this.http.get(this._ruleBaseUrl, buildHttpRequestOptions(queryParams)).toPromise()
|
||||||
return Observable.of({});
|
.then(response => response.json() as ReplicationRule[])
|
||||||
|
.catch(error => Promise.reject(error))
|
||||||
}
|
}
|
||||||
|
|
||||||
public disableReplicationRule(ruleId: number | string): Observable<any> | any {
|
public getReplicationRule(ruleId: number | string): Observable<ReplicationRule> | Promise<ReplicationRule> | ReplicationRule {
|
||||||
return Observable.of({});
|
if (!ruleId) {
|
||||||
|
return Promise.reject("Bad argument");
|
||||||
}
|
}
|
||||||
|
|
||||||
public getJobs(ruleId: number | string, queryParams?: RequestQueryParams): Observable<ReplicationJob[]> | ReplicationJob[] {
|
let url: string = `${this._ruleBaseUrl}/${ruleId}`;
|
||||||
return Observable.of([]);
|
return this.http.get(url, HTTP_JSON_OPTIONS).toPromise()
|
||||||
|
.then(response => response.json() as ReplicationRule)
|
||||||
|
.catch(error => Promise.reject(error));
|
||||||
|
}
|
||||||
|
|
||||||
|
public createReplicationRule(replicationRule: ReplicationRule): Observable<any> | Promise<any> | any {
|
||||||
|
if (!this._isValidRule(replicationRule)) {
|
||||||
|
return Promise.reject('Bad argument');
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.http.post(this._ruleBaseUrl, JSON.stringify(replicationRule), HTTP_JSON_OPTIONS).toPromise()
|
||||||
|
.then(response => response)
|
||||||
|
.catch(error => Promise.reject(error));
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateReplicationRule(replicationRule: ReplicationRule): Observable<any> | Promise<any> | any {
|
||||||
|
if (!this._isValidRule(replicationRule) || !replicationRule.id) {
|
||||||
|
return Promise.reject('Bad argument');
|
||||||
|
}
|
||||||
|
|
||||||
|
let url: string = `${this._ruleBaseUrl}/${replicationRule.id}`;
|
||||||
|
return this.http.put(url, JSON.stringify(replicationRule), HTTP_JSON_OPTIONS).toPromise()
|
||||||
|
.then(response => response)
|
||||||
|
.catch(error => Promise.reject(error));
|
||||||
|
}
|
||||||
|
|
||||||
|
public deleteReplicationRule(ruleId: number | string): Observable<any> | Promise<any> | any {
|
||||||
|
if (!ruleId || ruleId <= 0) {
|
||||||
|
return Promise.reject('Bad argument');
|
||||||
|
}
|
||||||
|
|
||||||
|
let url: string = `${this._ruleBaseUrl}/${ruleId}`;
|
||||||
|
return this.http.delete(url, HTTP_JSON_OPTIONS).toPromise()
|
||||||
|
.then(response => response)
|
||||||
|
.catch(error => Promise.reject(error));
|
||||||
|
}
|
||||||
|
|
||||||
|
public enableReplicationRule(ruleId: number | string): Observable<any> | Promise<any> | any {
|
||||||
|
if (!ruleId || ruleId <= 0) {
|
||||||
|
return Promise.reject('Bad argument');
|
||||||
|
}
|
||||||
|
|
||||||
|
let url: string = `${this._ruleBaseUrl}/${ruleId}/enablement`;
|
||||||
|
return this.http.put(url, { enabled: 1 }, HTTP_JSON_OPTIONS).toPromise()
|
||||||
|
.then(response => response)
|
||||||
|
.catch(error => Promise.reject(error));
|
||||||
|
}
|
||||||
|
|
||||||
|
public disableReplicationRule(ruleId: number | string): Observable<any> | Promise<any> | any {
|
||||||
|
if (!ruleId || ruleId <= 0) {
|
||||||
|
return Promise.reject('Bad argument');
|
||||||
|
}
|
||||||
|
|
||||||
|
let url: string = `${this._ruleBaseUrl}/${ruleId}/enablement`;
|
||||||
|
return this.http.put(url, { enabled: 0 }, HTTP_JSON_OPTIONS).toPromise()
|
||||||
|
.then(response => response)
|
||||||
|
.catch(error => Promise.reject(error));
|
||||||
|
}
|
||||||
|
|
||||||
|
public getJobs(ruleId: number | string, queryParams?: RequestQueryParams): Observable<ReplicationJob[]> | Promise<ReplicationJob[]> | ReplicationJob[] {
|
||||||
|
if (!ruleId || ruleId <= 0) {
|
||||||
|
return Promise.reject('Bad argument');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!queryParams) {
|
||||||
|
queryParams = new RequestQueryParams();
|
||||||
|
}
|
||||||
|
|
||||||
|
queryParams.set('policy_id', '' + ruleId);
|
||||||
|
return this.http.get(this._jobBaseUrl, buildHttpRequestOptions(queryParams)).toPromise()
|
||||||
|
.then(response => response.json() as ReplicationJob[])
|
||||||
|
.catch(error => Promise.reject(error));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,11 +5,13 @@ import { SharedModule } from '../shared/shared.module';
|
|||||||
import { SERVICE_CONFIG, IServiceConfig } from '../service.config';
|
import { SERVICE_CONFIG, IServiceConfig } from '../service.config';
|
||||||
|
|
||||||
describe('RepositoryService', () => {
|
describe('RepositoryService', () => {
|
||||||
beforeEach(() => {
|
|
||||||
const mockConfig: IServiceConfig = {
|
const mockConfig: IServiceConfig = {
|
||||||
repositoryBaseEndpoint: "/api/repositories/testing"
|
repositoryBaseEndpoint: "/api/repositories/testing"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let config: IServiceConfig;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
SharedModule
|
SharedModule
|
||||||
@ -24,9 +26,17 @@ describe('RepositoryService', () => {
|
|||||||
useValue: mockConfig
|
useValue: mockConfig
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
config = TestBed.get(SERVICE_CONFIG);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be initialized', inject([RepositoryDefaultService], (service: RepositoryService) => {
|
it('should be initialized', inject([RepositoryDefaultService], (service: RepositoryService) => {
|
||||||
expect(service).toBeTruthy();
|
expect(service).toBeTruthy();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should inject the right config', () => {
|
||||||
|
expect(config).toBeTruthy();
|
||||||
|
expect(config.repositoryBaseEndpoint).toEqual("/api/repositories/testing");
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -40,11 +40,11 @@ describe('TagService', () => {
|
|||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
const mockConfig: IServiceConfig = {
|
const mockConfig: IServiceConfig = {
|
||||||
repositoryBaseEndpoint: "/api/repositories/testing"
|
repositoryBaseEndpoint: "/api/repositories/testing"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
SharedModule
|
SharedModule
|
||||||
|
Loading…
Reference in New Issue
Block a user