Skip to content

Commit

Permalink
test preProcessing
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiriMoran committed Dec 19, 2024
1 parent a8380bb commit 33455b8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pkg/synthesis/synthesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,21 @@ var allTests = []synthesisTest{
},
}

func (a *synthesisTest) run(t *testing.T) {
params := model.OutputParameters{
Format: "txt",
}
func (a *synthesisTest) runPreprocessing(t *testing.T) {
rc := data.ExamplesGeneration(a.exData)
res, err := NSXSynthesis(rc, params)
parser := model.NewNSXConfigParserFromResourcesContainer(rc)
err := parser.RunParser()
require.Nil(t, err)
fmt.Println(res)
config := parser.GetConfig()
policy := preProcessing(config.Fw.CategoriesSpecs)
fmt.Println(policy.string())
// todo: test via comparing output to files in a separate PR (issue with window in analyzer tests)
}

func TestSynthesis(t *testing.T) {
func TestPreprocessing(t *testing.T) {
logging.Init(logging.HighVerbosity)
for i := range allTests {
test := &allTests[i]
test.run(t)
test.runPreprocessing(t)
}
}

0 comments on commit 33455b8

Please sign in to comment.