testutil

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

Ticket-Server/TestUtil

The following functions and future functionality appeared to be needed across multiple packages and in multiple tests and relevant to v23 functionality. I opted to create a smaller package for them to be imported in a slim, DRY fashion.

The general use of these functions is to mock and test ticket-server functionality when verifying blessings and other v23 artifacts.

func RunBlesserServer

Creates a generic ticket server to use in a test with all permissions.

func RunAndCapture

Runs a command and captures the output, somewhat specifically designed for running and capturing grail-access output against a mock ticket server.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAndCapture

func RunAndCapture(t *testing.T, cmd *exec.Cmd) (stdout, stderr string)

RunAndCapture runs a command and captures the stdout and stderr

func RunBlesserServer

func RunBlesserServer(ctx *v23context.T, t *testing.T, stub interface{}) (*v23context.T, naming.Endpoint)

RunBlesserServer runs a test v23 server, returns a context and an endpoint

Types

This section is empty.

Jump to

Keyboard shortcuts

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