realenv

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigOptions

func DefaultConfigOptions(config *pachconfig.Configuration)

DefaultConfigOptions is a serviceenv config option with the defaults used for tests

Types

type RealEnv

type RealEnv struct {
	testpachd.MockEnv

	ServiceEnv               serviceenv.ServiceEnv
	AdminServer              adminapi.APIServer
	AuthServer               authapi.APIServer
	IdentityServer           identity.APIServer
	EnterpriseServer         enterprise.APIServer
	LicenseServer            license.APIServer
	PPSServer                ppsapi.APIServer
	PFSServer                pfsapi.APIServer
	DebugServer              debug.DebugServer
	TransactionServer        txnserver.APIServer
	VersionServer            pb.APIServer
	ProxyServer              proxy.APIServer
	MockPPSTransactionServer *testpachd.MockPPSTransactionServer
}

RealEnv contains a setup for running end-to-end pachyderm tests locally. It includes the base MockEnv struct as well as a real instance of the API server. These calls can still be mocked, but they default to calling into the real server endpoints.

func NewRealEnv

func NewRealEnv(ctx context.Context, t testing.TB, customOpts ...pachconfig.ConfigOption) *RealEnv

NewRealEnv constructs a MockEnv, then forwards all API calls to go to API server instances for supported operations. PPS uses a fake clientset which allows some PPS behavior to work.

*Deprecated: Use pachd.NewTestPachd instead.

func NewRealEnvWithIdentity

func NewRealEnvWithIdentity(ctx context.Context, t testing.TB, customOpts ...pachconfig.ConfigOption) *RealEnv

NewRealEnvWithIdentity creates a new real Env and then activates an identity server with dex.

func NewRealEnvWithPPSTransactionMock

func NewRealEnvWithPPSTransactionMock(ctx context.Context, t testing.TB, customOpts ...pachconfig.ConfigOption) *RealEnv

NewRealEnvWithPPSTransactionMock constructs a MockEnv, then forwards all API calls to go to API server instances for supported operations. A mock implementation of PPS Transactions are used.

func (*RealEnv) ActivateIdentity

func (realEnv *RealEnv) ActivateIdentity(t testing.TB)

Jump to

Keyboard shortcuts

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