testutils

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

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MockToken        = "this_is_cc_token"
	MockRefreshToken = "this_is_refresh_token"
)
View Source
const (
	TestUserID = "3106056c-bdc6-4f06-be33-5056ba745023"
)

Variables

This section is empty.

Functions

func CreateRefreshToken

func CreateRefreshToken(userID, jwtKey string, currentTime time.Time) (string, error)

func CreateToken

func CreateToken(jwtKey, userID, email, gcToken, providerToken string, currentTime time.Time) (string, error)

func GenerateRandomString

func GenerateRandomString(n int) (string, error)

func GetExpiredToken

func GetExpiredToken() string

func GetTempFileName

func GetTempFileName(dir string, prefix string, suffix string) (string, error)

func GetTestRefreshToken

func GetTestRefreshToken() string

func GetTestToken

func GetTestToken() string

func SendInterrupt

func SendInterrupt(c *expect.Console)

func ValidateListOutput

func ValidateListOutput(t *testing.T, expected string, actual string, skipFields []int) (isValid bool)

Types

type Claims

type Claims struct {
	UserID        string `json:"userId"`
	Email         string `json:"email"`
	ProviderToken string `json:"providerToken"`
	GCtoken       string `json:"gcToken"`
	jwt.StandardClaims
}

type MockCommander

type MockCommander struct {
	// contains filtered or unexported fields
}

func (*MockCommander) GetURL

func (c *MockCommander) GetURL(url string)

func (*MockCommander) Start

func (c *MockCommander) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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