fix(tests): Normalize route configurations in tests to use name (remove id) and standardize route names

This commit is contained in:
2025-12-09 21:39:49 +00:00
parent 788fdd79c5
commit 05c5635a13
9 changed files with 25 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
{
"expiryDate": "2026-03-09T00:26:32.907Z",
"issueDate": "2025-12-09T00:26:32.907Z",
"savedAt": "2025-12-09T00:26:32.907Z"
"expiryDate": "2026-03-09T14:50:10.005Z",
"issueDate": "2025-12-09T14:50:10.005Z",
"savedAt": "2025-12-09T14:50:10.006Z"
}

View File

@@ -1,5 +1,13 @@
# Changelog
## 2025-12-09 - 22.1.1 - fix(tests)
Normalize route configurations in tests to use name (remove id) and standardize route names
- Removed deprecated id properties from route configurations in multiple tests and rely on the name property instead
- Standardized route.name values to kebab-case / lowercase (examples: 'tcp-forward', 'tls-passthrough', 'domain-a', 'domain-b', 'test-forward', 'nftables-test', 'regular-test', 'forward-test', 'test-forward', 'tls-test')
- Added explicit names for inner and outer proxies in proxy-chain-cleanup test ('inner-backend', 'outer-frontend')
- Updated certificate metadata timestamps in certs/static-route/meta.json
## 2025-12-09 - 22.1.0 - feat(smart-proxy)
Improve connection/rate-limit atomicity, SNI parsing, HttpProxy & ACME orchestration, and routing utilities

View File

@@ -58,8 +58,7 @@ tap.test('should forward TCP connections correctly', async () => {
enableDetailedLogging: true,
routes: [
{
id: 'tcp-forward',
name: 'TCP Forward Route',
name: 'tcp-forward',
match: {
ports: 8080,
},
@@ -107,8 +106,7 @@ tap.test('should handle TLS passthrough correctly', async () => {
enableDetailedLogging: true,
routes: [
{
id: 'tls-passthrough',
name: 'TLS Passthrough Route',
name: 'tls-passthrough',
match: {
ports: 8443,
domains: 'test.example.com',
@@ -168,8 +166,7 @@ tap.test('should handle SNI-based forwarding', async () => {
enableDetailedLogging: true,
routes: [
{
id: 'domain-a',
name: 'Domain A Route',
name: 'domain-a',
match: {
ports: 8443,
domains: 'a.example.com',
@@ -186,8 +183,7 @@ tap.test('should handle SNI-based forwarding', async () => {
},
},
{
id: 'domain-b',
name: 'Domain B Route',
name: 'domain-b',
match: {
ports: 8443,
domains: 'b.example.com',

View File

@@ -32,8 +32,7 @@ tap.test('setup test server', async () => {
tap.test('regular forward route should work correctly', async () => {
smartProxy = new SmartProxy({
routes: [{
id: 'test-forward',
name: 'Test Forward Route',
name: 'test-forward',
match: { ports: 7890 },
action: {
type: 'forward',
@@ -100,8 +99,7 @@ tap.test('regular forward route should work correctly', async () => {
tap.skip.test('NFTables forward route should not terminate connections (requires root)', async () => {
smartProxy = new SmartProxy({
routes: [{
id: 'nftables-test',
name: 'NFTables Test Route',
name: 'nftables-test',
match: { ports: 7891 },
action: {
type: 'forward',

View File

@@ -32,8 +32,7 @@ tap.test('forward connections should not be immediately closed', async (t) => {
enableDetailedLogging: true,
routes: [
{
id: 'forward-test',
name: 'Forward Test Route',
name: 'forward-test',
match: {
ports: 8080,
},

View File

@@ -26,8 +26,7 @@ tap.skip.test('NFTables forwarding should not terminate connections (requires ro
enableDetailedLogging: true,
routes: [
{
id: 'nftables-test',
name: 'NFTables Test Route',
name: 'nftables-test',
match: {
ports: 8080,
},
@@ -42,8 +41,7 @@ tap.skip.test('NFTables forwarding should not terminate connections (requires ro
},
// Also add regular forwarding route for comparison
{
id: 'regular-test',
name: 'Regular Forward Route',
name: 'regular-test',
match: {
ports: 8081,
},

View File

@@ -25,7 +25,7 @@ tap.test('port forwarding should not immediately close connections', async (tool
// Create proxy with forwarding route
proxy = new SmartProxy({
routes: [{
id: 'test',
name: 'test-forward',
match: { ports: 9999 },
action: {
type: 'forward',
@@ -58,7 +58,7 @@ tap.test('TLS passthrough should work correctly', async () => {
// Create proxy with TLS passthrough
proxy = new SmartProxy({
routes: [{
id: 'tls-test',
name: 'tls-test',
match: { ports: 8443, domains: 'test.example.com' },
action: {
type: 'forward',

View File

@@ -10,6 +10,7 @@ tap.test('setup two smartproxies in a chain configuration', async () => {
innerProxy = new SmartProxy({
routes: [
{
name: 'inner-backend',
match: {
ports: 8002
},
@@ -39,6 +40,7 @@ tap.test('setup two smartproxies in a chain configuration', async () => {
outerProxy = new SmartProxy({
routes: [
{
name: 'outer-frontend',
match: {
ports: 8001
},

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartproxy',
version: '22.1.0',
version: '22.1.1',
description: 'A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.'
}