validator

package
v0.0.0-...-7b93913 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DISABLE_RECORDINGS = false

TODO: set to true when development is complete and no new recordings need to be created (CI mode enabled)

Variables

This section is empty.

Functions

func ProviderVcrSetup

func ProviderVcrSetup(t *testing.T) *http.Client

Types

type GetRequestTestData

type GetRequestTestData struct {
	//query data is submitted to the .Get function during the test
	QueryData map[string]string

	//data and metadata should be the expected values returned by the test
	Data     map[string]string
	Metadata map[string]string
}

type ListRequestTestData

type ListRequestTestData struct {
	//query data is submitted to the .Get function during the test
	QueryData map[string]string

	//results should be the expected values returned by the test
	Results []credentials.SummaryInterface
}

type ProviderTestSuite

type ProviderTestSuite struct {
	suite.Suite
	Provider providers.Interface

	// the following values must be set in the calling provider test file.
	ProviderConfig        map[string]interface{}
	Get_TestData          GetRequestTestData
	GetById_TestData      GetRequestTestData
	GetByPath_TestData    GetRequestTestData
	Get_Ssh_TestData      GetRequestTestData
	Get_Text_TestData     GetRequestTestData
	Get_UserPass_TestData GetRequestTestData

	List_TestData ListRequestTestData
}

Define the suite, and absorb the built-in basic suite functionality from testify - including a T() method which returns the current testing context

func (*ProviderTestSuite) SetupTest

func (suite *ProviderTestSuite) SetupTest()

Make sure that VariableThatShouldStartAtFive is set to five before each test

func (*ProviderTestSuite) TearDownTest

func (suite *ProviderTestSuite) TearDownTest()

func (*ProviderTestSuite) TestProvider_Authenticate

func (suite *ProviderTestSuite) TestProvider_Authenticate()

func (*ProviderTestSuite) TestProvider_GetById

func (suite *ProviderTestSuite) TestProvider_GetById()

func (*ProviderTestSuite) TestProvider_GetByPath

func (suite *ProviderTestSuite) TestProvider_GetByPath()

func (*ProviderTestSuite) TestProvider_Get_GenericCredential

func (suite *ProviderTestSuite) TestProvider_Get_GenericCredential()

func (*ProviderTestSuite) TestProvider_Get_SshCredential

func (suite *ProviderTestSuite) TestProvider_Get_SshCredential()

func (*ProviderTestSuite) TestProvider_Get_TextCredential

func (suite *ProviderTestSuite) TestProvider_Get_TextCredential()

func (*ProviderTestSuite) TestProvider_Get_UserPassCredential

func (suite *ProviderTestSuite) TestProvider_Get_UserPassCredential()

func (*ProviderTestSuite) TestProvider_Get_WithEmptyConfigShouldFail

func (suite *ProviderTestSuite) TestProvider_Get_WithEmptyConfigShouldFail()

func (*ProviderTestSuite) TestProvider_List

func (suite *ProviderTestSuite) TestProvider_List()

func (*ProviderTestSuite) TestProvider_New

func (suite *ProviderTestSuite) TestProvider_New()

func (*ProviderTestSuite) TestProvider_New_WithInvalidCredentialsShouldFail

func (suite *ProviderTestSuite) TestProvider_New_WithInvalidCredentialsShouldFail()

Jump to

Keyboard shortcuts

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