Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for mock (0.15 sec)

  1. cni/pkg/ipset/nldeps_mock.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package ipset
    
    import (
    	"net/netip"
    
    	"github.com/stretchr/testify/mock"
    )
    
    type MockedIpsetDeps struct {
    	mock.Mock
    }
    
    func FakeNLDeps() *MockedIpsetDeps {
    	return &MockedIpsetDeps{}
    }
    
    func (m *MockedIpsetDeps) ipsetIPHashCreate(name string, v6 bool) error {
    	args := m.Called(name, v6)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  2. istioctl/pkg/cli/mock_client.go

    Xiaopeng Han <******@****.***> 1709887099 +0800
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/informers_test.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package nodeagent
    
    import (
    	"context"
    	"fmt"
    	"testing"
    	"time"
    
    	"github.com/stretchr/testify/mock"
    	corev1 "k8s.io/api/core/v1"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/types"
    
    	"istio.io/istio/cni/pkg/util"
    	"istio.io/istio/pkg/config/constants"
    	"istio.io/istio/pkg/kube"
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  4. cni/pkg/plugin/plugin_test.go

    }
    
    func buildMockConf(ambientEnabled bool, eventURL string) string {
    	return fmt.Sprintf(
    		mockConfTmpl,
    		"1.0.0",
    		"1.0.0",
    		"eth0",
    		testSandboxDirectory,
    		eventURL,
    		ambientEnabled,
    		"mock",
    	)
    }
    
    func buildFakePodAndNSForClient() (*corev1.Pod, *corev1.Namespace) {
    	proxy := corev1.Container{Name: "mockContainer"}
    	app := corev1.Container{Name: "foo-init"}
    	fakePod := &corev1.Pod{
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 17.5K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/fakes_test.go

    }
    
    func (f *fakeZtunnel) PodAdded(ctx context.Context, pod *corev1.Pod, netns Netns) error {
    	f.addedPods.Add(1)
    	return f.addError
    }
    
    func (f *fakeZtunnel) Close() error {
    	return nil
    }
    
    // fakeNs is a mock struct for testing
    type fakeNs struct {
    	closed *atomic.Bool
    	fd     uintptr
    	inode  uint64
    }
    
    func newFakeNs(fd uintptr) *fakeNs {
    	// the fake inode is the fd! magic.
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  6. cni/pkg/nodeagent/ztunnelserver.go

    }
    
    func (c *connMgr) addConn(conn *ZtunnelConnection) {
    	log.Debug("ztunnel connected")
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	c.connectionSet[conn] = struct{}{}
    	c.latestConn = conn
    	ztunnelConnected.RecordInt(int64(len(c.connectionSet)))
    }
    
    func (c *connMgr) LatestConn() *ZtunnelConnection {
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	return c.latestConn
    }
    
    func (c *connMgr) deleteConn(conn *ZtunnelConnection) {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  7. cni/pkg/nodeagent/podcgroupns.go

    	// - 0::/../crio-45490e76e0878aaa4d9808f7d2eefba37f093c3efbba9838b6d8ab804d9bd814.scope
    	// First trim off any .scope suffix. This allows for a cleaner regex since
    	// we don't have to muck with greediness. TrimSuffix is no-copy so this
    	// is cheap.
    	cgroupPath = strings.TrimSuffix(cgroupPath, ".scope")
    
    	var matchResults map[string]string
    	for _, regex := range cgroupREs {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 11K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/pod_cache.go

    func (p *podNetnsCache) UpsertPodCacheWithNetns(uid string, workload WorkloadInfo) Netns {
    	// lock current snapshot pod map
    	p.mu.Lock()
    	defer p.mu.Unlock()
    	if existing := p.currentPodCache[uid]; existing.Netns != nil {
    		if existing.Netns.Inode() == workload.Netns.Inode() {
    			workload.Netns.Close()
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  9. operator/cmd/mesh/manifest_shared_test.go

    		}
    	} else if err != nil {
    		return err
    	}
    	obj.SetResourceVersion(check.GetResourceVersion())
    	return clnt.Update(ctx, obj)
    }}
    
    // recreateSimpleTestEnv mocks fake kube api server which relies on a simple object tracker
    func recreateSimpleTestEnv() {
    	log.Infof("Creating simple test environment\n")
    	helmreconciler.TestMode = true
    	s := scheme.Scheme
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Tue Feb 20 22:39:28 GMT 2024
    - 11.7K bytes
    - Viewed (1)
  10. Makefile.core.mk

    init: $(TARGET_OUT)/istio_is_init init-ztunnel-rs
    	@mkdir -p ${TARGET_OUT}/logs
    	@mkdir -p ${TARGET_OUT}/release
    
    # I tried to make this dependent on what I thought was the appropriate
    # lock file, but it caused the rule for that file to get run (which
    # seems to be about obtaining a new version of the 3rd party libraries).
    $(TARGET_OUT)/istio_is_init: bin/init.sh istio.deps | $(TARGET_OUT)
    Plain Text
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 26 19:45:17 GMT 2024
    - 22.5K bytes
    - Viewed (0)
Back to top