Documentation ¶
Index ¶
- Constants
- func Copy(sourceFile string, destinationFile string) error
- func CopyDir(src string, dest string) error
- func DumpTree(parser_results ParserResults, bucket_pour BucketPourInfo, opts DumpOpts)
- func Escape(val string) string
- type AssertFail
- type BucketPourInfo
- type BucketResults
- type DumpOpts
- type HubIndex
- type HubTest
- type HubTestItem
- type HubTestItemConfig
- type ParserAssert
- func (p *ParserAssert) AssertFile(testFile string) error
- func (p *ParserAssert) AutoGenFromFile(filename string) (string, error)
- func (p *ParserAssert) AutoGenParserAssert() string
- func (p *ParserAssert) EvalExpression(expression string) (string, error)
- func (p *ParserAssert) LoadTest(filename string) error
- func (p *ParserAssert) Run(assert string) (bool, error)
- func (p *ParserAssert) RunExpression(expression string) (interface{}, error)
- type ParserCoverage
- type ParserResult
- type ParserResults
- type ScenarioAssert
- func (s *ScenarioAssert) AssertFile(testFile string) error
- func (s *ScenarioAssert) AutoGenFromFile(filename string) (string, error)
- func (s *ScenarioAssert) AutoGenScenarioAssert() string
- func (s *ScenarioAssert) EvalExpression(expression string) (string, error)
- func (s *ScenarioAssert) LoadTest(filename string, bucketpour string) error
- func (s *ScenarioAssert) Run(assert string) (bool, error)
- func (s *ScenarioAssert) RunExpression(expression string) (interface{}, error)
- type ScenarioCoverage
Constants ¶
View Source
const ( ParserAssertFileName = "parser.assert" ParserResultFileName = "parser-dump.yaml" ScenarioAssertFileName = "scenario.assert" ScenarioResultFileName = "bucket-dump.yaml" BucketPourResultFileName = "bucketpour-dump.yaml" )
Variables ¶
This section is empty.
Functions ¶
func DumpTree ¶
func DumpTree(parser_results ParserResults, bucket_pour BucketPourInfo, opts DumpOpts)
Types ¶
type AssertFail ¶
type BucketPourInfo ¶
func LoadBucketPourDump ¶
func LoadBucketPourDump(filepath string) (*BucketPourInfo, error)
type BucketResults ¶
func LoadScenarioDump ¶
func LoadScenarioDump(filepath string) (*BucketResults, error)
func (BucketResults) Len ¶
func (b BucketResults) Len() int
func (BucketResults) Less ¶
func (b BucketResults) Less(i, j int) bool
func (BucketResults) Swap ¶
func (b BucketResults) Swap(i, j int)
type HubTest ¶
type HubTest struct { CrowdSecPath string CscliPath string HubPath string HubTestPath string HubIndexFile string TemplateConfigPath string TemplateProfilePath string TemplateSimulationPath string HubIndex *HubIndex Tests []*HubTestItem }
func NewHubTest ¶
func (*HubTest) GetParsersCoverage ¶
func (h *HubTest) GetParsersCoverage() ([]ParserCoverage, error)
func (*HubTest) GetScenariosCoverage ¶
func (h *HubTest) GetScenariosCoverage() ([]ScenarioCoverage, error)
func (*HubTest) LoadAllTests ¶
func (*HubTest) LoadTestItem ¶
func (h *HubTest) LoadTestItem(name string) (*HubTestItem, error)
type HubTestItem ¶
type HubTestItem struct { Name string Path string CrowdSecPath string CscliPath string RuntimePath string RuntimeHubPath string RuntimeDataPath string RuntimePatternsPath string RuntimeConfigFilePath string RuntimeProfileFilePath string RuntimeSimulationFilePath string RuntimeHubConfig *csconfig.Hub ResultsPath string ParserResultFile string ScenarioResultFile string BucketPourResultFile string HubPath string HubTestPath string HubIndexFile string TemplateConfigPath string TemplateProfilePath string TemplateSimulationPath string HubIndex *HubIndex Config *HubTestItemConfig Success bool ErrorsList []string AutoGen bool ParserAssert *ParserAssert ScenarioAssert *ScenarioAssert CustomItemsLocation []string }
func (*HubTestItem) Clean ¶
func (t *HubTestItem) Clean() error
func (*HubTestItem) InstallHub ¶
func (t *HubTestItem) InstallHub() error
func (*HubTestItem) Run ¶
func (t *HubTestItem) Run() error
type HubTestItemConfig ¶
type HubTestItemConfig struct { Parsers []string `yaml:"parsers"` Scenarios []string `yaml:"scenarios"` PostOVerflows []string `yaml:"postoverflows"` LogFile string `yaml:"log_file"` LogType string `yaml:"log_type"` Labels map[string]string `yaml:"labels"` IgnoreParsers bool `yaml:"ignore_parsers"` // if we test a scenario, we don't want to assert on Parser }
type ParserAssert ¶
type ParserAssert struct { File string AutoGenAssert bool AutoGenAssertData string NbAssert int Fails []AssertFail Success bool TestData *ParserResults }
func NewParserAssert ¶
func NewParserAssert(file string) *ParserAssert
func (*ParserAssert) AssertFile ¶
func (p *ParserAssert) AssertFile(testFile string) error
func (*ParserAssert) AutoGenFromFile ¶
func (p *ParserAssert) AutoGenFromFile(filename string) (string, error)
func (*ParserAssert) AutoGenParserAssert ¶
func (p *ParserAssert) AutoGenParserAssert() string
func (*ParserAssert) EvalExpression ¶
func (p *ParserAssert) EvalExpression(expression string) (string, error)
func (*ParserAssert) LoadTest ¶
func (p *ParserAssert) LoadTest(filename string) error
func (*ParserAssert) RunExpression ¶
func (p *ParserAssert) RunExpression(expression string) (interface{}, error)
type ParserCoverage ¶
type ParserResult ¶
type ParserResults ¶
type ParserResults map[string]map[string][]ParserResult
func LoadParserDump ¶
func LoadParserDump(filepath string) (*ParserResults, error)
type ScenarioAssert ¶
type ScenarioAssert struct { File string AutoGenAssert bool AutoGenAssertData string NbAssert int Fails []AssertFail Success bool TestData *BucketResults PourData *BucketPourInfo }
func NewScenarioAssert ¶
func NewScenarioAssert(file string) *ScenarioAssert
func (*ScenarioAssert) AssertFile ¶
func (s *ScenarioAssert) AssertFile(testFile string) error
func (*ScenarioAssert) AutoGenFromFile ¶
func (s *ScenarioAssert) AutoGenFromFile(filename string) (string, error)
func (*ScenarioAssert) AutoGenScenarioAssert ¶
func (s *ScenarioAssert) AutoGenScenarioAssert() string
func (*ScenarioAssert) EvalExpression ¶
func (s *ScenarioAssert) EvalExpression(expression string) (string, error)
func (*ScenarioAssert) LoadTest ¶
func (s *ScenarioAssert) LoadTest(filename string, bucketpour string) error
func (*ScenarioAssert) RunExpression ¶
func (s *ScenarioAssert) RunExpression(expression string) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.