Skip to content

test: added additional algod_client tests#518

Open
lempira wants to merge 19 commits intodecouplingfrom
feature/add-algod-tests-1
Open

test: added additional algod_client tests#518
lempira wants to merge 19 commits intodecouplingfrom
feature/add-algod-tests-1

Conversation

@lempira
Copy link
Contributor

@lempira lempira commented Dec 30, 2025

Added some additional tests to algod_client. I skipped the 7 tests that still need recordings. Will handle those later.

NOTE: This PR depends on this one merging first. It removes private and experimental api endpoints from the polytest config.

  - Add config.ts with mock and localnet algod client configuration
  - Add schemas.ts with 82 Zod schemas generated from OAS spec
  - Add scripts/generate-zod-schemas.ts for generating Zod schemas from OpenAPI specs
- Used Zod schema validation for API responses
- Update generate-zod-schemas.ts to convert kebab-case and snake_case to camelCase
- Add VSCode debug configuration for Vitest tests
- Skip version test due to genesisHashB64 type mismatch (Uint8Array vs string)
- Add tests for getSupply, suggestedParams, getPendingTransactions
- Add SuggestedParams schema manually (client-derived type not in OAS)
- Add localnetConfig for POST endpoints to hit localnet (port 4001)
- Implement get_v2_status_wait_for_block_after_round.test.ts
- Implement get_v2_transactions_pending_txid.test.ts (mock server issue pending)
- Implement post_v2_transactions.test.ts with proper transaction signing
- Implement post_v2_transactions_simulate.test.ts with unsigned transactions
- Use Vitest property matchers to handle dynamic data (txId, rounds) in snapshots
- Add devDependencies: algokit-algo25, @noble/ed25519, zod
- Implement TEAL compile and disassemble tests (using localnet)
- Implement devmode block offset tests (using localnet)
- Skip ledger sync tests (require follower mode)
- Skip delta endpoint tests (require archival node features)
- Skip stateproofs test (requires mainnet/testnet)
- Skip teal dryrun test (API method not implemented)
@lempira lempira changed the base branch from main to decoupling December 30, 2025 16:15
// Polytest Group: Common Tests

// TODO: Fix msgpack response handling in PollyJS mock server
// Skipped: Requires experimental/archival node features and msgpack response handling
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't appear to be skipped like the comment implies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed comment

})
})
})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably remove this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

describe('Common Tests', () => {
// Polytest Group: Common Tests

// Skipping this test because there is mismtach between the oas schema and what is returned for
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment can be removed, it's not skipped

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants