plextest

package
v2.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: GPL-2.0, GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package plextest provides test helpers for building a plex.Client wired to an httptest.Server, kept out of package plex so the production binary never links testing/httptest.

Index

Constants

View Source
const TestToken = "$fixture-test-token"

TestToken is the fixed credential used by NewTestClientFromServer and hand-rolled fixtures. The leading "$" mimics an unexpanded env-var placeholder the repo secret-scan regex excludes.

Variables

This section is empty.

Functions

func NewTestClientFromServer

func NewTestClientFromServer(t testing.TB, ts *httptest.Server) *plex.Client

NewTestClientFromServer constructs a *plex.Client wired to ts, using the server's own HTTP client for proper TLS/transport handling.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL