repotest

package
v0.16.7 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package repotest contains various test helpers for tests that work with code relying on plugin Git repos and the asdf plugin index

Three main actions:

* Install plugin index repo into asdf (index contains records that point to local plugins defined by this package) * Install plugin into asdf data dir * Create local plugin repo that can be cloned into asdf

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePlugin

func GeneratePlugin(fixtureName, dir, pluginName string) (string, error)

GeneratePlugin copies in the specified plugin fixture into a test directory and initializes a Git repo for it so it can be installed by asdf.

func GeneratePluginIndex

func GeneratePluginIndex(asdfDataDir string) (string, error)

GeneratePluginIndex generates a mock plugin index Git repo inside the given directory.

func InstallPlugin

func InstallPlugin(fixtureName, asdfDataDir, pluginName string) (string, error)

InstallPlugin copies in the specified plugin fixture into the asdfDataDir's plugin directory and initializes a Git repo for it so asdf treats it as installed.

func InstallPluginIndex

func InstallPluginIndex(asdfDataDir string) error

InstallPluginIndex generates and installs a plugin index Git repo inside of the provided asdf data directory.

func Setup

func Setup(asdfDataDir string) error

Setup copies all files into place and initializes all repos for any Go test that needs either plugin repos or the plugin index repo.

func WritePluginCallback

func WritePluginCallback(pluginDir, callbackName, script string) error

WritePluginCallback is for creating new plugin callbacks on the fly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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