| Age | Commit message (Collapse) | Author |
|
|
|
Changed from selectively skipping test modules to running only --lib
tests (unit tests). This is cleaner and more maintainable.
Integration tests (tests/*.rs) require:
- git binary in PATH
- Ability to spawn subprocesses
- Network access for some tests
- TestRelay fixture (spawns ngit-grasp)
These requirements don't work in the Nix sandbox, so we run only
unit tests (--lib) during package build. Full integration test suite
runs in environments where git is available:
- Local dev (nix develop includes git)
- CI/CD (git installed)
- Manual testing (cargo test runs all tests)
|
|
Extended test skipping to include integration tests in tests/common/
that create git repos and spawn git processes:
- common::git_server:: - Tests that create git repos and run git daemon
- common::purgatory_helpers:: - Helper tests that init git repos
These tests are integration tests that verify git interaction, they
run successfully in:
- Local development (git available in devShell)
- CI/CD pipelines (git installed)
- Docker builds (git installed in image)
The Nix sandbox intentionally isolates builds and doesn't provide git
during the package build phase. We skip these tests to allow clean
builds while maintaining test coverage in appropriate environments.
|
|
Tests that spawn git subprocesses fail in the Nix sandbox because
git is not available in PATH during the build phase. These tests
are integration tests that verify git subprocess interaction, not
unit tests of core functionality.
Skipping test modules:
- git::subprocess::tests - Tests git upload-pack/receive-pack spawning
- git::tests - Tests that create git repos and manipulate refs
- purgatory::helpers::tests - Tests that init git repos
The skipped tests still run in:
- Local development (git is in devShell)
- CI/CD pipelines (git is installed)
- Integration test suite (uses TestRelay fixture)
This fix allows the package to build cleanly in Nix while maintaining
test coverage in appropriate environments.
|
|
The hash for the nostr-0.44.1 dependency was in Nix base32 format
(sha256-02cawkx...) but needs to be in SRI base64 format
(sha256-DwcWmwxNUQRR...) for compatibility with modern Nix.
This was causing nixos-rebuild to fail with:
error: invalid SRI hash '02cawkx6bxfi3bn1sb5ws8cn9wzcwsk8cdv1vx8h8lad1jdic1qg'
|
|
- Create nix/module.nix with comprehensive systemd service
- Support both relayOwnerNsecFile and relayOwnerNsec options
- Auto-generate nsec if neither specified
- Add security hardening (NoNewPrivileges, ProtectSystem, etc.)
- Expose as nixosModules.default and nixosModules.ngit-grasp
- Include example configuration in nix/example-configuration.nix
- Add outputHashes for nostr git dependency
|
|
- WebSocket-based relay using tokio-tungstenite
- Full NIP-01 protocol support (EVENT, REQ, CLOSE)
- Event validation (signature and ID)
- In-memory event storage
- Filter support (IDs, authors, kinds, since/until)
- Configuration via environment variables
- Nix flake for reproducible builds
- Test automation script
All 6 NIP-01 smoke tests passing (100%)
|