Documentation ¶
Overview ¶
utils add features to make the test life easier
utils add features to make the test life easier
utils add features to make the test life easier
utils add features to make the test life easier
utils add features to make the test life easier
utils add features to make the test life easier
utils add features to make the test life easier
utils add features to make the test life easier
utils add features to make the test life easier
Index ¶
- Variables
- func BuildHTTPHeader(r *http.Request, content []byte)
- func ClearDatabase(database *mgo.Database)
- func CompareDomain(d1, d2 model.Domain) bool
- func CompareProtocolDomain(d1, d2 protocol.DomainResponse) bool
- func CompareProtocolDomains(d1, d2 protocol.DomainsResponse) bool
- func CompareProtocolLinks(l1 []protocol.Link, l2 []protocol.Link) bool
- func CompareProtocolScan(s1, s2 protocol.ScanResponse) bool
- func CompareProtocolScans(s1, s2 protocol.ScansResponse) bool
- func CompareScan(s1, s2 model.Scan) bool
- func ConvertKeyAlgorithm(algorithm uint8) model.DSAlgorithm
- func Errorln(message string, err error)
- func Fatalln(message string, err error)
- func GenerateKSKAndSignZone(zone string) (*dns.DNSKEY, *dns.RRSIG, error)
- func GenerateKey() (*dns.DNSKEY, dns.PrivateKey, error)
- func GenerateZSKAndSignZone(zone string) (*dns.DNSKEY, *dns.RRSIG, error)
- func PrintProgress(label string, percentage int)
- func Println(message string)
- func ReadConfigFile(configFilePath string, config interface{}) error
- func SignKey(zone string, dnskey *dns.DNSKEY, privateKey dns.PrivateKey) (*dns.RRSIG, error)
- func StartCPUProfile(name string) func()
- func StartDNSServer(port int, udpMaxSize uint16) (server *dns.Server)
- func StartGoRoutinesProfile(name string) func()
- func StartMailServer(port int) (chan *mail.Message, chan error, error)
- func StartMemoryProfile(name string) func()
- func StartRESTServer() func()
- func StartWebClient()
- func WriteReport(reportFile string, report string)
Constants ¶
This section is empty.
Variables ¶
var ( // Config file path is a mandatory parameter ErrConfigFileUndefined = errors.New("Config file path undefined") )
List of possible errors in this test. There can be also other errors from low level structures
var (
TestName string
)
Functions ¶
func BuildHTTPHeader ¶
func ClearDatabase ¶
func ClearDatabase(database *mgo.Database)
Function created to remove all entries from the database to ensure that the tests enviroments are always equal
func CompareDomain ¶
Function to compare if two domains are equal, cannot use operator == because of the slices inside the domain object
func CompareProtocolDomain ¶
func CompareProtocolDomain(d1, d2 protocol.DomainResponse) bool
Function to compare if two domains are equal, cannot use operator == because of the slices inside the domain object
func CompareProtocolDomains ¶
func CompareProtocolDomains(d1, d2 protocol.DomainsResponse) bool
Function to compare if two domain lists are equal, cannot use operator == because of the slices inside the domain object
func CompareProtocolScan ¶
func CompareProtocolScan(s1, s2 protocol.ScanResponse) bool
func CompareProtocolScans ¶
func CompareProtocolScans(s1, s2 protocol.ScansResponse) bool
func CompareScan ¶
func ConvertKeyAlgorithm ¶
func ConvertKeyAlgorithm(algorithm uint8) model.DSAlgorithm
func Errorln ¶
Function only to add the test name before the log message. This is useful when you have many tests running and logging in the same file, like in a continuous deployment scenario. Prints an error message without ending the test
func Fatalln ¶
Function only to add the test name before the log message. This is useful when you have many tests running and logging in the same file, like in a continuous deployment scenario. Prints an error message and ends the test
func GenerateKSKAndSignZone ¶
func GenerateKey ¶
func GenerateKey() (*dns.DNSKEY, dns.PrivateKey, error)
We don't specify a zone for the DNSKEY because we want to reuse the same key in many different zones (performance tests)
func GenerateZSKAndSignZone ¶
func PrintProgress ¶
Function to allow printing a percentage inline, that is, replacing the last percentage with the new one. You should always use this method until we got 100%, or you will miss the breaking line and the text after the percentage will be mess up
func Println ¶
func Println(message string)
Function only to add the test name before the log message. This is useful when you have many tests running and logging in the same file, like in a continuous deployment scenario. Prints a simple message without ending the test
func ReadConfigFile ¶
Function to read the configuration file
func StartCPUProfile ¶
func StartCPUProfile(name string) func()
Initialize CPU profile. This function will return a function that MUST be defered to the end of the report test. If something goes wrong, the funciton will abort the program
func StartGoRoutinesProfile ¶
func StartGoRoutinesProfile(name string) func()
Initialize Go Routines profile. This function will return a function that MUST be defered to the end of the report test. If something goes wrong, the funciton will abort the program
func StartMemoryProfile ¶
func StartMemoryProfile(name string) func()
Initialize Memory profile. This function will return a function that MUST be defered to the end of the report test. If something goes wrong, the funciton will abort the program
func StartRESTServer ¶
func StartRESTServer() func()
func StartWebClient ¶
func StartWebClient()
func WriteReport ¶
If we found a report file in the current path, rename it so we don't lose the old data. We are going to use the modification date from the file. We also don't check the errors because we really don't care
Types ¶
This section is empty.