Skip to content

Commit

Permalink
change kill to sigterm
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed Jul 31, 2024
1 parent 729846c commit ab09903
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions packages/client/test/cli/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('[CLI]', () => {
message.includes('network=sepolia chainId=11155111'),
'client is using custom inputs for network and network ID',
)
child.kill(9)
child.kill()
resolve(undefined)
}
}
Expand All @@ -52,7 +52,7 @@ describe('[CLI]', () => {
message.includes('network=kaustinen6'),
'client is using custom inputs for network and network ID',
)
child.kill(9)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -94,7 +94,7 @@ describe('[CLI]', () => {
count -= 1
}
if (count === 0) {
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand All @@ -113,7 +113,7 @@ describe('[CLI]', () => {
'client correctly throws error when "dev" option is passed in without a value',
)
}
child.kill(15)
child.kill()
resolve(undefined)
}
await clientRunHelper(cliArgs, onData, true)
Expand All @@ -128,7 +128,7 @@ describe('[CLI]', () => {
if (message.includes('cannot reuse')) {
assert.ok(true, 'cannot reuse ports between HTTP and WS RPCs')
}
child.kill(15)
child.kill()
resolve(undefined)
}
await clientRunHelper(cliArgs, onData, true)
Expand All @@ -154,7 +154,7 @@ describe('[CLI]', () => {
'authentication failure shows that auth is defaulting to active',
)
}
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -183,7 +183,7 @@ describe('[CLI]', () => {
const client = Client.http({ port: 8553 })
const res = await client.request('engine_exchangeCapabilities', [], 2.0)
assert.ok(res.result.length > 0, 'engine api is responsive without need for auth header')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -214,7 +214,7 @@ describe('[CLI]', () => {
const client = Client.http({ port: Number(customPort) })
const res = await client.request('engine_exchangeCapabilities', [], 2.0)
assert.ok(res.result.length > 0, 'engine api is responsive without need for auth header')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -246,7 +246,7 @@ describe('[CLI]', () => {
const client = Client.http({ hostname: '0.0.0.0', port: Number(customPort) })
const res = await client.request('engine_exchangeCapabilities', [], 2.0)
assert.ok(res.result.length > 0, 'engine api is responsive on custom address')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -279,7 +279,7 @@ describe('[CLI]', () => {
;(client as any).ws.on('open', async function () {
const res = await client.request('engine_exchangeCapabilities', [], 2.0)
assert.ok(res.result.length > 0, 'read from WS RPC on custom address and port')
child.kill(15)
child.kill()
resolve(undefined)
})
}
Expand Down Expand Up @@ -309,7 +309,7 @@ describe('[CLI]', () => {
;(client as any).ws.on('open', async function () {
const res = await client.request('web3_clientVersion', [], 2.0)
assert.ok(res.result.includes('EthereumJS'), 'read from WS RPC')
child.kill(15)
child.kill()
resolve(undefined)
})
}
Expand Down Expand Up @@ -349,7 +349,7 @@ describe('[CLI]', () => {
assert.fail('should have thrown on invalid client address')
} catch (e: any) {
assert.ok(e !== undefined, 'failed to connect to RPC on invalid address')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand All @@ -363,11 +363,11 @@ describe('[CLI]', () => {
resolve: Function,
) => {
if (message.includes('address=http://')) {
child.kill(15)
child.kill()
assert.fail('http endpoint should not be enabled')
}
if (message.includes('address=ws://')) {
child.kill(15)
child.kill()
assert.fail('ws endpoint should not be enabled')
}
if (message.includes('Miner: Assembling block')) {
Expand All @@ -387,7 +387,7 @@ describe('[CLI]', () => {
) => {
if (message.includes('JSON-RPC: Supported Methods')) {
assert.ok(message, 'logged out supported RPC methods')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -415,7 +415,7 @@ describe('[CLI]', () => {
) => {
if (message.includes('DEBUG')) {
assert.ok(message, 'debug logging is enabled')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand All @@ -431,7 +431,7 @@ describe('[CLI]', () => {
) => {
if (message.includes('account cache')) {
assert.ok(message.includes('2000'), 'account cache option works')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand All @@ -446,7 +446,7 @@ describe('[CLI]', () => {
) => {
if (message.includes('storage cache')) {
assert.ok(message.includes('2000'), 'storage cache option works')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand All @@ -462,7 +462,7 @@ describe('[CLI]', () => {
) => {
if (message.includes('code cache')) {
assert.ok(message.includes('2000'), 'code cache option works')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand All @@ -477,7 +477,7 @@ describe('[CLI]', () => {
) => {
if (message.includes('trie cache')) {
assert.ok(message.includes('2000'), 'trie cache option works')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand All @@ -492,7 +492,7 @@ describe('[CLI]', () => {
) => {
if (message.includes('Reading bootnodes')) {
assert.ok(message.includes('num=2'), 'passing bootnode.txt URL for bootnodes option works')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand All @@ -511,7 +511,7 @@ describe('[CLI]', () => {
message.includes('Client started successfully'),
'Clients started with experimental feature options',
)
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -541,7 +541,7 @@ describe('[CLI]', () => {
message.includes('Client started successfully'),
'Clients starts with client execution limits',
)
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -577,7 +577,7 @@ describe('[CLI]', () => {
const client = Client.http({ port: 8573 })
const res = await client.request('web3_clientVersion', [], 2.0)
assert.ok(res.result.includes('EthereumJS'), 'read from HTTP RPC')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -609,7 +609,7 @@ describe('[CLI]', () => {
const client = Client.http({ port: 8593 })
const res = await client.request('web3_clientVersion', [], 2.0)
assert.ok(res.result.includes('EthereumJS'), 'read from HTTP RPC')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -650,7 +650,7 @@ describe('[CLI]', () => {
const client = Client.http({ port: 8548 })
const res = await client.request('web3_clientVersion', [], 2.0)
assert.ok(res.result.includes('EthereumJS'), 'read from HTTP RPC')
child.kill(15)
child.kill()
resolve(undefined)
}
}
Expand Down Expand Up @@ -771,7 +771,7 @@ describe('[CLI]', () => {
const client = Client.http({ port: 8549 })
const res = await client.request('web3_clientVersion', [], 2.0)
assert.ok(res.result.includes('EthereumJS'), 'read from HTTP RPC')
child.kill(15)
child.kill()
fs.rmSync(dir, { recursive: true, force: true })
resolve(undefined)
}
Expand All @@ -789,7 +789,7 @@ describe('[CLI]', () => {
if (message.includes('Unknown argument: datadir')) {
assert.ok(true, 'correctly errors on unknown arguments')
}
child.kill(15)
child.kill()
resolve(undefined)
}
await clientRunHelper(cliArgs, onData, true)
Expand All @@ -804,7 +804,7 @@ describe('[CLI]', () => {
if (message.includes('Arguments chainId and gethGenesis are mutually exclusive')) {
assert.ok(true, 'correctly errors on conflicting arguments')
}
child.kill(15)
child.kill()
resolve(undefined)
}
await clientRunHelper(cliArgs, onData, true)
Expand Down

0 comments on commit ab09903

Please sign in to comment.