Skip to content

Commit 48cf8e0

Browse files
committed
adding tests
1 parent 22fd40b commit 48cf8e0

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

pkg/ibmvpc/analysis_output_test.go

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,26 @@ tests for the entire flow:
2525

2626
const analysisOut = "analysis_out"
2727

28+
var t testfunc.VpcAnalysisTest = testfunc.VpcAnalysisTest{
29+
VpcTestCommon: testfunc.VpcTestCommon{
30+
InputConfig: "iks_workers_large",
31+
UseCases: []vpcmodel.OutputUseCase{vpcmodel.AllEndpoints},
32+
Format: vpcmodel.DRAWIO,
33+
},
34+
Grouping: true,
35+
}
36+
func g(t testfunc.VpcAnalysisTest) *testfunc.VpcAnalysisTest{
37+
return &t
38+
}
39+
var t2 = t
2840
var tests = []*testfunc.VpcAnalysisTest{
41+
g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),
42+
g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),
43+
g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),
44+
g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),g(t), g(t),
45+
}
46+
47+
var tests2 = []*testfunc.VpcAnalysisTest{
2948
{
3049
VpcTestCommon: testfunc.VpcTestCommon{
3150
InputConfig: "acl_testing5",
@@ -515,12 +534,15 @@ var tests = []*testfunc.VpcAnalysisTest{
515534
Grouping: true,
516535
},
517536
// commented until https://github.com/np-guard/vpc-network-config-analyzer/issues/847 is fixed
518-
// {
519-
// InputConfig: "iks_workers_large",
520-
// UseCases: []vpcmodel.OutputUseCase{vpcmodel.AllEndpoints},
521-
// Grouping: true,
522-
// Format: vpcmodel.DRAWIO,
523-
// },
537+
{
538+
VpcTestCommon: testfunc.VpcTestCommon{
539+
InputConfig: "iks_workers_large",
540+
UseCases: []vpcmodel.OutputUseCase{vpcmodel.AllEndpoints},
541+
Format: vpcmodel.DRAWIO,
542+
},
543+
Grouping: true,
544+
},
545+
524546
// Grouping test of identical names different resources and thus different UIDs that should not be merged
525547
{
526548
VpcTestCommon: testfunc.VpcTestCommon{

0 commit comments

Comments
 (0)