Skip to content

Commit

Permalink
test: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
hezhengxu2018 committed Aug 12, 2023
1 parent 7801b9e commit 7d64259
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/config.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const cnpmcoreConfig: CnpmcoreConfig = {
syncUpstreamFirst: false,
sourceRegistrySyncTimeout: 180000,
taskQueueHighWaterSize: 100,
syncMode: SyncMode.proxy,
syncMode: SyncMode.none,
syncDeleteMode: SyncDeleteMode.delete,
syncPackageWorkerMaxConcurrentTasks: 10,
triggerHookWorkerMaxConcurrentTasks: 10,
Expand Down Expand Up @@ -51,7 +51,7 @@ export const cnpmcoreConfig: CnpmcoreConfig = {
enableStoreFullPackageVersionManifestsToDatabase: false,
enableNpmClientAndVersionCheck: true,
syncNotFound: false,
redirectNotFound: false,
redirectNotFound: true,
enableUnpkg: true,
strictSyncSpecivicVersion: false,
strictValidateTarballPkg: false,
Expand Down
3 changes: 0 additions & 3 deletions test/repository/ProxyCachePepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { app } from 'egg-mock/bootstrap';
import { ProxyCacheRepository } from '../../app/repository/ProxyCacheRepository';
import { ProxyCache } from '../../app/core/entity/ProxyCache';
import { DIST_NAMES } from '../../app/core/entity/Package';
import { PROXY_MODE_CACHED_PACKAGE_DIR_NAME } from '../../app/common/constants';

describe('test/repository/ProxyCacheRepository.test.ts', () => {
let proxyCacheRepository: ProxyCacheRepository;
Expand All @@ -14,7 +13,6 @@ describe('test/repository/ProxyCacheRepository.test.ts', () => {
proxyCacheModel = await proxyCacheRepository.saveProxyCache(ProxyCache.create({
fullname: 'foo-bar',
fileType: DIST_NAMES.FULL_MANIFESTS,
filePath: `/${PROXY_MODE_CACHED_PACKAGE_DIR_NAME}/foo-bar/${DIST_NAMES.FULL_MANIFESTS}`,
}));
});

Expand All @@ -24,7 +22,6 @@ describe('test/repository/ProxyCacheRepository.test.ts', () => {
const newProxyCache = await proxyCacheRepository.saveProxyCache(ProxyCache.create({
fullname: 'foo-bar-new',
fileType: DIST_NAMES.FULL_MANIFESTS,
filePath: `/${PROXY_MODE_CACHED_PACKAGE_DIR_NAME}/foo-bar-new/${DIST_NAMES.FULL_MANIFESTS}`,
}));
assert(newProxyCache);
assert(newProxyCache.fullname === 'foo-bar-new');
Expand Down

0 comments on commit 7d64259

Please sign in to comment.