Documentation
¶
Overview ¶
Package pbstest is a minimal fake Proxmox Backup Server for tests: it accepts the backup-protocol upgrade over TLS and implements the session endpoints gopbs uses (dynamic index create/append/close, chunk and blob upload, previous, finish).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
Name string
Digests []string
Offsets []uint64
Closed bool
Size uint64
ChunkCount uint64
}
Index is a dynamic index written during a session
type Server ¶
type Server struct {
// ExpectAuthorization, when set, is the exact Authorization header required on the
// upgrade request; anything else is answered 401 like PBS (minus its 3 s delay).
ExpectAuthorization string
// FailUpgrade, when non-zero, answers every upgrade with this status
FailUpgrade int
// contains filtered or unexported fields
}
Server is the fake PBS
func (*Server) ChunkCount ¶
ChunkCount is the number of distinct chunks uploaded
func (*Server) Fingerprint ¶
Fingerprint is the SHA-256 of the certificate as colon-separated hex
Click to show internal directories.
Click to hide internal directories.