Documentation
¶
Index ¶
- Variables
- func AllowedTest(w http.ResponseWriter, r *http.Request)
- func CertSetup(ipAddress string) (serverTLSConf *tls.Config, clientTLSConf *tls.Config, err error)
- func GetBodyData(r *http.Request) (interface{}, error)
- func GetBodyMapData(r *http.Request) (map[string]interface{}, error)
- func GetOperation(r *http.Request) string
- func GetPathSegment(r *http.Request, part int) string
- func GetRequestParams(request *http.Request) url.Values
- func GetSession(w http.ResponseWriter, request *http.Request) *sessions.Session
- func GetTableNames(r *http.Request, allTableNames []string) []string
- func GzCompress(input string) (string, error)
- func GzUncompress(input string) (string, error)
- func IsServerStarted(url string) bool
- func JsonEqual(vx, vy interface{}) bool
- func MinInt(a, b int) int
- func NumberFormat(number float64, dec int, decPoint, thousandsSep string) string
- func RemoveDuplicateStr(strSlice []string) []string
- func RunTests(t *testing.T, serverUrlHttps string, tests []Test)
- func SelectConfig(ignoreEnvVar bool) string
- func TestGetUrl(t *testing.T, url string, response interface{})
- type Test
- type VariableStore
Constants ¶
This section is empty.
Variables ¶
View Source
var VStore = &VariableStore{values: map[string]interface{}{}}
Functions ¶
func AllowedTest ¶
func AllowedTest(w http.ResponseWriter, r *http.Request)
func CertSetup ¶
CertSetup generate a self signed certificate if https is on and no certificate is provided To be used for development purposes only From https://gist.github.com/shaneutt/5e1995295cff6721c89a71d13a71c251 https://shaneutt.com/blog/golang-ca-and-signed-cert-go/
func GetBodyData ¶
GetBodyData tries to get data from body request, as a urlencoded content type or as json by default
func GetOperation ¶
func GetSession ¶
func GzCompress ¶
func GzUncompress ¶
func IsServerStarted ¶
func JsonEqual ¶
func JsonEqual(vx, vy interface{}) bool
Equal checks equality between 2 Body-encoded data. https://github.com/emacampolo/gomparator/blob/master/json_util.go
func NumberFormat ¶
func RemoveDuplicateStr ¶
func SelectConfig ¶
For tests, if there is no GCA_CONFIG_FILE env var provided, we create a sqlite db and we use a default config file
func TestGetUrl ¶
Types ¶
type Test ¶
type Test struct { Name string Method string Uri string Body string Want string WantRegex string StatusCode int Username string Password string AuthMethod string Jar http.CookieJar RequestHeader map[string]string WantHeader map[string]string SkipFor map[string]bool Driver string Server string WantJson string }
type VariableStore ¶
type VariableStore struct {
// contains filtered or unexported fields
}
func (*VariableStore) Get ¶
func (vs *VariableStore) Get(key string) interface{}
func (*VariableStore) Set ¶
func (vs *VariableStore) Set(key string, value interface{})
Click to show internal directories.
Click to hide internal directories.