repositorytest

package
v0.0.0-...-1b7c243 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2017 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package repositorytest provides a fake repository manager for use in tests.

Users can use the fake manager by just importing this package, setting the "repo-manager" setting to "fake" and interacting with the manager.

This package also includes some helper functions that allow to interact with the unexported state of the fake manager, allowing users of the package to reset the manager or retrieve the list of registered users, for example.

Index

Constants

View Source
const Diff = "fake-diff"

Diff is the diff returned by the Diff method.

View Source
const ServerHost = "git.tsuru.io"

ServerHost is the name of the host that is used in the Git URLs in all repositories managed by the fake manager.

Variables

This section is empty.

Functions

func Granted

func Granted(repo string) ([]string, error)

Granted returns the list of users with access granted to the given repository name, failing if the given repository isn't registered.

func Reset

func Reset()

Reset resets the internal state of the fake manager.

func Users

func Users() []string

Users returns the list of users currently registered in the fake manager.

Types

This section is empty.

Jump to

Keyboard shortcuts

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