@@ -772,79 +772,79 @@ func TestGetMetricAggregations(t *testing.T) {
772
772
want []string
773
773
}{
774
774
{
775
- "should return all aggregations when metrics filter empty" ,
776
- NestedListAlias {},
777
- aggregations ,
775
+ name : "should return all aggregations when metrics filter empty" ,
776
+ filters : NestedListAlias {},
777
+ want : aggregations ,
778
778
},
779
779
{
780
- "should return all aggregations when namespace not in filters" ,
781
- NestedListAlias {
780
+ name : "should return all aggregations when namespace not in filters" ,
781
+ filters : NestedListAlias {
782
782
"another.namespace" : nil ,
783
783
},
784
- aggregations ,
784
+ want : aggregations ,
785
785
},
786
786
{
787
- "should return all aggregations when metric in filters" ,
788
- NestedListAlias {
787
+ name : "should return all aggregations when metric in filters" ,
788
+ filters : NestedListAlias {
789
789
testNamespaceName : {
790
790
testMetricName : {},
791
791
},
792
792
},
793
- aggregations ,
793
+ want : aggregations ,
794
794
},
795
795
{
796
- "should return all aggregations ignoring metric name case" ,
797
- NestedListAlias {
796
+ name : "should return all aggregations ignoring metric name case" ,
797
+ filters : NestedListAlias {
798
798
testNamespaceName : {
799
799
strings .ToLower (testMetricName ): {},
800
800
},
801
801
},
802
- aggregations ,
802
+ want : aggregations ,
803
803
},
804
804
{
805
- "should return all aggregations when asterisk in filters" ,
806
- NestedListAlias {
805
+ name : "should return all aggregations when asterisk in filters" ,
806
+ filters : NestedListAlias {
807
807
testNamespaceName : {
808
808
testMetricName : {filterAllAggregations },
809
809
},
810
810
},
811
- aggregations ,
811
+ want : aggregations ,
812
812
},
813
813
{
814
- "should be empty when metric not in filters" ,
815
- NestedListAlias {
814
+ name : "should be empty when metric not in filters" ,
815
+ filters : NestedListAlias {
816
816
testNamespaceName : {
817
817
"not_this_metric" : {},
818
818
},
819
819
},
820
- []string {},
820
+ want : []string {},
821
821
},
822
822
{
823
- "should return one aggregations" ,
824
- NestedListAlias {
823
+ name : "should return one aggregations" ,
824
+ filters : NestedListAlias {
825
825
testNamespaceName : {
826
826
testMetricName : {aggregations [0 ]},
827
827
},
828
828
},
829
- []string {aggregations [0 ]},
829
+ want : []string {aggregations [0 ]},
830
830
},
831
831
{
832
- "should return one aggregations ignoring aggregation case" ,
833
- NestedListAlias {
832
+ name : "should return one aggregations ignoring aggregation case" ,
833
+ filters : NestedListAlias {
834
834
testNamespaceName : {
835
835
testMetricName : {strings .ToLower (aggregations [0 ])},
836
836
},
837
837
},
838
- []string {aggregations [0 ]},
838
+ want : []string {aggregations [0 ]},
839
839
},
840
840
{
841
- "should return many aggregations" ,
842
- NestedListAlias {
841
+ name : "should return many aggregations" ,
842
+ filters : NestedListAlias {
843
843
testNamespaceName : {
844
844
testMetricName : {aggregations [0 ], aggregations [2 ]},
845
845
},
846
846
},
847
- []string {aggregations [0 ], aggregations [2 ]},
847
+ want : []string {aggregations [0 ], aggregations [2 ]},
848
848
},
849
849
}
850
850
@@ -869,19 +869,19 @@ func TestMapFindInsensitive(t *testing.T) {
869
869
want bool
870
870
}{
871
871
{
872
- "should find when same case" ,
873
- testNamespace ,
874
- true ,
872
+ name : "should find when same case" ,
873
+ key : testNamespace ,
874
+ want : true ,
875
875
},
876
876
{
877
- "should find when different case" ,
878
- strings .ToLower (testNamespace ),
879
- true ,
877
+ name : "should find when different case" ,
878
+ key : strings .ToLower (testNamespace ),
879
+ want : true ,
880
880
},
881
881
{
882
- "should not find when not exists" ,
883
- "microsoft.eventhub/namespaces" ,
884
- false ,
882
+ name : "should not find when not exists" ,
883
+ key : "microsoft.eventhub/namespaces" ,
884
+ want : false ,
885
885
},
886
886
}
887
887
for _ , tt := range tests {
0 commit comments