Skip to content

Commit

Permalink
test(proxy): update proxy port
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-hxl committed Jul 21, 2024
1 parent 86e6cc5 commit 634f909
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion test/automation/api/crawlFile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const storeDirs = path.resolve(__dirname, './upload')
async function testCrawlFile() {
const testCrawlApp = createCrawl({
log: false,
proxy: { urls: ['http://localhost:14892'] }
proxy: { urls: ['http://localhost:7890'] }
})

const res = await testCrawlApp.crawlFile({
Expand Down
2 changes: 1 addition & 1 deletion test/automation/api/crawlHTML.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const createCrawl = (
async function testCrawlHTML() {
const testCrawlApp = createCrawl({
log: false,
proxy: { urls: ['http://localhost:14892'] }
proxy: { urls: ['http://localhost:7890'] }
})

const res = await testCrawlApp.crawlHTML({
Expand Down
2 changes: 1 addition & 1 deletion test/automation/api/crawlPage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const createCrawl = (
async function testCrawlPage() {
const testCrawlApp = createCrawl({
log: false,
proxy: { urls: ['http://localhost:14892'] }
proxy: { urls: ['http://localhost:7890'] }
})

const res = await testCrawlApp.crawlPage({
Expand Down
2 changes: 1 addition & 1 deletion test/automation/arguments/proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function proxy() {
targets: ['https://', 'http://localhost:8888/html'],
maxRetry: 3,
proxy: {
urls: ['http://localhost:129032', 'http://localhost:14892'],
urls: ['http://localhost:129032', 'http://localhost:7890'],
switchByErrorCount: 2
}
})
Expand Down
4 changes: 2 additions & 2 deletions test/automation/written/crawlData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function loaderBaseConfig() {
const testCrawlApp = createCrawl({
log: false,
baseUrl: 'http://localhost:8888',
proxy: { urls: ['http://localhost:14892'] },
proxy: { urls: ['http://localhost:7890'] },
timeout: 10000,
intervalTime: { max: 1000 },
maxRetry: 0
Expand All @@ -79,7 +79,7 @@ async function loaderAdvancedConfig() {

const res = await testCrawlApp.crawlData({
targets: ['/data', '/data'],
proxy: { urls: ['http://localhost:14892'] },
proxy: { urls: ['http://localhost:7890'] },
timeout: 10000,
intervalTime: { max: 1000 },
maxRetry: 0
Expand Down
12 changes: 6 additions & 6 deletions test/automation/written/crawlFile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const storeDirs = path.resolve(__dirname, './upload')
async function writtenCrawlFileDetailConfig() {
const testCrawlApp = createCrawl({
log: false,
proxy: { urls: ['http://localhost:14892'] }
proxy: { urls: ['http://localhost:7890'] }
})

const res = await testCrawlApp.crawlFile({
Expand All @@ -34,7 +34,7 @@ async function writtenCrawlFileDetailConfig() {
async function writtenCrawlFileDetailConfigArr() {
const testCrawlApp = createCrawl({
log: false,
proxy: { urls: ['http://localhost:14892'] }
proxy: { urls: ['http://localhost:7890'] }
})

const res = await testCrawlApp.crawlFile(
Expand All @@ -51,7 +51,7 @@ async function writtenCrawlFileDetailConfigArr() {
async function writtenCrawlFileAdvancedConfig() {
const testCrawlApp = createCrawl({
log: false,
proxy: { urls: ['http://localhost:14892'] }
proxy: { urls: ['http://localhost:7890'] }
})

const res = await testCrawlApp.crawlFile({
Expand All @@ -72,7 +72,7 @@ async function loaderBaseConfig() {
log: false,
baseUrl:
'https://raw.githubusercontent.com/coder-hxl/airbnb-upload/master/area',
proxy: { urls: ['http://localhost:14892'] },
proxy: { urls: ['http://localhost:7890'] },
timeout: 10000,
intervalTime: { max: 1000 },
maxRetry: 0
Expand All @@ -96,7 +96,7 @@ async function loaderAdvancedConfig() {

const res = await testCrawlApp.crawlFile({
targets: ['/4401.jpg', '/4403.jpg'],
proxy: { urls: ['http://localhost:14892'] },
proxy: { urls: ['http://localhost:7890'] },
timeout: 10000,
storeDirs,
intervalTime: { max: 1000 },
Expand All @@ -112,7 +112,7 @@ async function storeConfig() {
log: false,
baseUrl:
'https://raw.githubusercontent.com/coder-hxl/airbnb-upload/master/area',
proxy: { urls: ['http://localhost:14892'] }
proxy: { urls: ['http://localhost:7890'] }
})

const record: string[] = []
Expand Down
4 changes: 2 additions & 2 deletions test/automation/written/crawlHTML.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function loaderBaseConfig() {
const testCrawlApp = createCrawl({
log: false,
baseUrl: 'http://localhost:8888',
proxy: { urls: ['http://localhost:14892'] },
proxy: { urls: ['http://localhost:7890'] },
timeout: 10000,
intervalTime: { max: 1000 },
maxRetry: 0
Expand All @@ -79,7 +79,7 @@ async function loaderAdvancedConfig() {

const res = await testCrawlApp.crawlHTML({
targets: ['/html', '/html'],
proxy: { urls: ['http://localhost:14892'] },
proxy: { urls: ['http://localhost:7890'] },
timeout: 10000,
intervalTime: { max: 1000 },
maxRetry: 0
Expand Down
10 changes: 5 additions & 5 deletions test/automation/written/crawlPage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function writtenString() {
async function writtenCrawlPageDetailConfig() {
const testCrawlApp = createCrawl({
log: false,
proxy: { urls: ['http://localhost:14892'] }
proxy: { urls: ['http://localhost:7890'] }
})

const res = await testCrawlApp.crawlPage({
Expand All @@ -38,7 +38,7 @@ async function writtenCrawlPageDetailConfig() {
async function writtenStringAndCrawlPageDetailConfigArr() {
const testCrawlApp = createCrawl({
log: false,
proxy: { urls: ['http://localhost:14892'] }
proxy: { urls: ['http://localhost:7890'] }
})

const res = await testCrawlApp.crawlPage([
Expand All @@ -55,7 +55,7 @@ async function writtenStringAndCrawlPageDetailConfigArr() {
async function writtenCrawlPageAdvancedConfig() {
const testCrawlApp = createCrawl({
log: false,
proxy: { urls: ['http://localhost:14892'] }
proxy: { urls: ['http://localhost:7890'] }
})

const res = await testCrawlApp.crawlPage({
Expand All @@ -76,7 +76,7 @@ async function loaderBaseConfig() {
const testCrawlApp = createCrawl({
log: false,
baseUrl: 'http://localhost:8888',
proxy: { urls: ['http://localhost:14892'] },
proxy: { urls: ['http://localhost:7890'] },
timeout: 10000,
intervalTime: { max: 1000 },
maxRetry: 0
Expand All @@ -98,7 +98,7 @@ async function loaderAdvancedConfig() {

const res = await testCrawlApp.crawlPage({
targets: ['/html', '/html'],
proxy: { urls: ['http://localhost:14892'] },
proxy: { urls: ['http://localhost:7890'] },
timeout: 10000,
intervalTime: { max: 1000 },
maxRetry: 0
Expand Down

0 comments on commit 634f909

Please sign in to comment.