Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Pubky Testnet
A local test network for developing Pubky Core or applications depending on it.
All resources are ephemeral, the database is an empheral Postgres, and all servers are cleaned up as the testnet dropped.
Quickstart
Requires a running Postgres.
# Example local Postgres with password auth
Run the testnet binary (all resources ephemeral). The environment variable must point to the postgres admin database.
TEST_PUBKY_CONNECTION_STRING='postgres://postgres:postgres@localhost:5432/postgres?pubky-test=true' cargo run -p pubky-testnet
Usage
Postgres
For the homeserver and therefore this testnet to be used, a postgres server is required.
By default, testnet will use postgres://localhost:5432/postgres?pubky-test=true.
?pubky-test=true indicates that the homeserver should create an emphemeral database.
If you want to change the connection string you have 2 options.
- Set the
TEST_PUBKY_CONNECTION_STRINGenvironment variable. - Set the connection string in the testnet constructor.
use ;
async
Inline testing
use EphemeralTestnet;
// Macro makes sure that the ephemeral Postgres databases are cleaned up.
async
Custom configuration
use ;
async
Binary (hardcoded testnet, and browser support).
If you need to run the testnet in a separate process, for example to test Pubky Core in browsers, you need to run this binary, which will create these components with hardcoded configurations: