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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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