You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task creation with owner address should fail with "invalid address" error (both API key and signature auth)
Task creation with smart wallet should succeed when using API key auth
Current Behavior
Three tests are failing with different issues:
Signature Auth + Owner Address
Expected: Should reject with "invalid address"
Actual: Successfully creates task with ID "29015"
API Key Auth + Smart Wallet
Expected: Should successfully create task
Actual: Fails with "1 CANCELLED: Call cancelled"
API Key Auth + Owner Address
Expected: Should reject with "invalid address"
Actual: Fails with "1 CANCELLED: Call cancelled"
Test Details
// Test 1 - Incorrectly succeedingtest("should fail when creating a task with owner address using signature",async()=>{awaitexpect(client.createTask({address: ownerAddress,tokenContract: TOKEN_CONTRACT,oracleContract: ORACLE_CONTRACT,})).rejects.toThrow("invalid address");});// Test 2 - Failing with cancellationtest("should create a task when authenticated with API key",async()=>{constresult=awaitclient.createTask({address: smartWallet,tokenContract: TOKEN_CONTRACT,oracleContract: ORACLE_CONTRACT,});expect(result).toBeDefined();});// Test 3 - Wrong error typetest("should fail when creating a task with owner address using API key",async()=>{awaitexpect(client.createTask({address: ownerAddress,tokenContract: TOKEN_CONTRACT,oracleContract: ORACLE_CONTRACT,})).rejects.toThrow("invalid address");});
Test Trace
FAIL tests/createTask.test.ts
listTasks Tests
✓ should throw error when creating a task without authentication (1178 ms)
Auth with Signature
✓ should create a task when authenticated with signature (285 ms)
✕ should fail when creating a task with owner address using signature (259 ms)
Auth with API key
✕ should create a task when authenticated with API key (161 ms)
✕ should fail when creating a task with owner address using API key (1250 ms)
Reproduction Steps
Run npx jest tests/createTask.test.ts
Observe multiple failures with inconsistent behaviors
Additional Context
API key authentication seems to have connection issues (CANCELLED errors)
Address validation is not working as expected with signature authentication
The system needs consistent behavior for owner address rejection across both auth methods
The text was updated successfully, but these errors were encountered:
chrisli30
changed the title
Critical: Task creation tests failing with inconsistent behaviors
Test failure: 3/5 tests failed for createTask.test.ts
Nov 1, 2024
Expected Behavior
Current Behavior
Three tests are failing with different issues:
Signature Auth + Owner Address
API Key Auth + Smart Wallet
API Key Auth + Owner Address
Test Details
Test Trace
Reproduction Steps
npx jest tests/createTask.test.ts
Additional Context
The text was updated successfully, but these errors were encountered: