Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 3,276 for mock (0.04 sec)

  1. security/pkg/credentialfetcher/plugin/mock.go

    // limitations under the License.
    
    // Test only: this is the mock plugin of credentialfetcher.
    
    package plugin
    
    import (
    	"fmt"
    	"net/http"
    	"net/http/httptest"
    	"net/url"
    	"os"
    	"sync"
    
    	"istio.io/istio/pkg/log"
    )
    
    const fakeTokenPrefix = "fake-token-"
    
    var mockcredLog = log.RegisterScope("mockcred", "Mock credential fetcher for istio agent")
    
    // MockPlugin is the plugin object.
    Registered: 2024-06-14 15:00
    - Last Modified: 2023-05-23 17:08
    - 3K bytes
    - Viewed (0)
  2. pkg/config/schema/collections/mock.go

    			if cfg.Spec.(*testconfig.MockConfig).Key == "" {
    				return nil, errors.New("empty key")
    			}
    			return nil, nil
    		},
    	}.MustBuild()
    
    	// Mocks is a Schemas containing the Mock Schema.
    	Mocks = collection.NewSchemasBuilder().MustAdd(Mock).Build()
    Registered: 2024-06-14 15:00
    - Last Modified: 2023-03-01 01:34
    - 1.4K bytes
    - Viewed (0)
  3. pkg/security/mock.go

    	si, f := d.items[resourceName]
    	if !f {
    		return nil, fmt.Errorf("resource %v not found", resourceName)
    	}
    	return si, nil
    }
    
    func (d *DirectSecretManager) Set(resourceName string, secret *SecretItem) {
    	d.mu.Lock()
    	defer d.mu.Unlock()
    	if secret == nil {
    		delete(d.items, resourceName)
    	} else {
    		d.items[resourceName] = secret
    	}
    }
    
    type FakeAuthenticator struct {
    	AllowedToken string
    	AllowedCert  string
    Registered: 2024-06-14 15:00
    - Last Modified: 2023-05-23 17:08
    - 4.5K bytes
    - Viewed (0)
  4. pkg/kubelet/status/testing/mock_pod_status_provider.go

    }
    
    // MockPodManagerMockRecorder is the mock recorder for MockPodManager.
    type MockPodManagerMockRecorder struct {
    	mock *MockPodManager
    }
    
    // NewMockPodManager creates a new mock instance.
    func NewMockPodManager(ctrl *gomock.Controller) *MockPodManager {
    	mock := &MockPodManager{ctrl: ctrl}
    	mock.recorder = &MockPodManagerMockRecorder{mock}
    	return mock
    }
    
    // EXPECT returns an object that allows the caller to indicate expected use.
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-03-07 08:12
    - 15.4K bytes
    - Viewed (0)
  5. pkg/kubelet/pod/testing/mock_manager.go

    }
    
    // NewMockManager creates a new mock instance.
    func NewMockManager(ctrl *gomock.Controller) *MockManager {
    	mock := &MockManager{ctrl: ctrl}
    	mock.recorder = &MockManagerMockRecorder{mock}
    	return mock
    }
    
    // EXPECT returns an object that allows the caller to indicate expected use.
    func (m *MockManager) EXPECT() *MockManagerMockRecorder {
    	return m.recorder
    }
    
    // AddPod mocks base method.
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-03-07 08:12
    - 8.8K bytes
    - Viewed (0)
  6. hack/verify-mocks.sh

    # This script checks whether updating of Mock files generated from Interfaces
    # is needed or not. We should run `hack/update-mocks.sh` 
    # if Mock files are out of date.
    # Usage: `hack/verify-mocks.sh`.
    
    
    set -o errexit
    set -o nounset
    set -o pipefail
    
    KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
    source "${KUBE_ROOT}/hack/lib/verify-generated.sh"
    
    Registered: 2024-06-15 01:39
    - Last Modified: 2023-08-22 18:39
    - 1K bytes
    - Viewed (0)
  7. pkg/kubelet/cadvisor/testing/cadvisor_mock.go

    type MockImageFsInfoProviderMockRecorder struct {
    	mock *MockImageFsInfoProvider
    }
    
    // NewMockImageFsInfoProvider creates a new mock instance.
    func NewMockImageFsInfoProvider(ctrl *gomock.Controller) *MockImageFsInfoProvider {
    	mock := &MockImageFsInfoProvider{ctrl: ctrl}
    	mock.recorder = &MockImageFsInfoProviderMockRecorder{mock}
    	return mock
    }
    
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-03-07 08:12
    - 8.4K bytes
    - Viewed (0)
  8. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/LockOnDemandCrossProcessCacheAccessTest.groovy

        def "releases retained lock on close"() {
            def action = Mock(Supplier)
            def lock = Mock(FileLock)
    
            given:
            _ * lockManager.lock(file, _, _, _, _) >> lock
            _ * lockManager.allowContention(lock, _)
    
            cacheAccess.withFileLock(action)
    
            when:
            cacheAccess.close()
    
            then:
            1 * lock.close()
            0 * _
        }
    
    Registered: 2024-06-12 18:38
    - Last Modified: 2024-04-16 15:49
    - 21.8K bytes
    - Viewed (0)
  9. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/FixedSharedModeCrossProcessCacheAccessTest.groovy

        def "acquires lock then validates cache and runs handler action on open"() {
            def lock = Mock(FileLock)
    
            when:
            cacheAccess.open()
    
            then:
            1 * lockManager.lock(file, lockOptions, "<cache>") >> lock
    
            then:
            1 * initAction.requiresInitialization(lock) >> false
    
            then:
            1 * onOpenAction.accept(lock)
            0 * _
        }
    
    Registered: 2024-06-12 18:38
    - Last Modified: 2024-04-16 15:49
    - 5.5K bytes
    - Viewed (0)
  10. platforms/software/dependency-management/src/test/groovy/org/gradle/internal/locking/DependencyLockingGraphVisitorTest.groovy

            given:
            startWithState([])
    
            DependencyGraphNode node = Mock()
            DependencyGraphComponent component = Mock()
            ModuleComponentIdentifier identifier = Mock()
            ComponentGraphResolveMetadata metadata = Mock()
    
            when:
            visitor.visitNode(node)
    
            then:
            2 * node.owner >> component
            1 * node.root >> false
    Registered: 2024-06-12 18:38
    - Last Modified: 2024-03-05 02:50
    - 9.1K bytes
    - Viewed (0)
Back to top