github.com/elfadel/cilium@v1.6.12/pkg/bpf/map_test.go (about)

     1  // Copyright 2018 Authors of Cilium
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // +build !privileged_tests
    16  
    17  package bpf
    18  
    19  import (
    20  	. "gopkg.in/check.v1"
    21  )
    22  
    23  func (s *BPFTestSuite) TestExtractCommonName(c *C) {
    24  	c.Assert(extractCommonName("cilium_calls_1157"), Equals, "calls")
    25  	c.Assert(extractCommonName("cilium_calls_netdev_ns_1"), Equals, "calls")
    26  	c.Assert(extractCommonName("cilium_calls_overlay_2"), Equals, "calls")
    27  	c.Assert(extractCommonName("cilium_ct4_global"), Equals, "ct4_global")
    28  	c.Assert(extractCommonName("cilium_ct_any4_global"), Equals, "ct_any4_global")
    29  	c.Assert(extractCommonName("cilium_ep_config_1157"), Equals, "ep_config")
    30  	c.Assert(extractCommonName("cilium_events"), Equals, "events")
    31  	c.Assert(extractCommonName("cilium_ipcache"), Equals, "ipcache")
    32  	c.Assert(extractCommonName("cilium_lb4_reverse_nat"), Equals, "lb4_reverse_nat")
    33  	c.Assert(extractCommonName("cilium_lb4_rr_seq"), Equals, "lb4_rr_seq")
    34  	c.Assert(extractCommonName("cilium_lb4_services"), Equals, "lb4_services")
    35  	c.Assert(extractCommonName("cilium_lxc"), Equals, "lxc")
    36  	c.Assert(extractCommonName("cilium_metrics"), Equals, "metrics")
    37  	c.Assert(extractCommonName("cilium_policy"), Equals, "policy")
    38  	c.Assert(extractCommonName("cilium_policy_1157"), Equals, "policy")
    39  	c.Assert(extractCommonName("cilium_policy_reserved_1"), Equals, "policy")
    40  	c.Assert(extractCommonName("cilium_proxy4"), Equals, "proxy4")
    41  	c.Assert(extractCommonName("cilium_tunnel_map"), Equals, "tunnel_map")
    42  }