Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 78 for mock (0.16 sec)

  1. 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)
  2. 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)
  3. cmd/erasure-server-pool-rebalance.go

    			ok = true
    		}
    	}
    	if ok {
    		lock := z.serverPools[0].NewNSLock(minioMetaBucket, rebalMetaName)
    		lkCtx, err := lock.GetLock(ctx, globalOperationTimeout)
    		if err != nil {
    			rebalanceLogIf(ctx, fmt.Errorf("failed to acquire write lock on %s/%s: %w", minioMetaBucket, rebalMetaName, err))
    			return err
    		}
    		defer lock.Unlock(lkCtx)
    
    		ctx = lkCtx.Context()
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  4. cmd/bucket-targets.go

    func (sys *BucketTargetSys) markOffline(ep *url.URL) {
    	sys.hMutex.Lock()
    	defer sys.hMutex.Unlock()
    	if h, ok := sys.hc[ep.Host]; ok {
    		h.Online = false
    		sys.hc[ep.Host] = h
    	}
    }
    
    func (sys *BucketTargetSys) initHC(ep *url.URL) {
    	sys.hMutex.Lock()
    	sys.hc[ep.Host] = epHealth{
    		Endpoint: ep.Host,
    		Scheme:   ep.Scheme,
    		Online:   true,
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  5. cmd/globals.go

    	globalAuthPluginMutex.Lock()
    	defer globalAuthPluginMutex.Unlock()
    	return globalAuthNPlugin
    }
    
    func newGlobalAuthZPluginFn() *polplugin.AuthZPlugin {
    	globalAuthPluginMutex.Lock()
    	defer globalAuthPluginMutex.Unlock()
    	return globalAuthZPlugin
    }
    
    func setGlobalAuthNPlugin(authn *idplugin.AuthNPlugin) {
    	globalAuthPluginMutex.Lock()
    	globalAuthNPlugin = authn
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  6. cmd/erasure-object_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	erasureDisks := xl.getDisks()
    	z.serverPools[0].erasureDisksMu.Lock()
    	xl.getDisks = func() []StorageAPI {
    		for i := range erasureDisks[:6] {
    			erasureDisks[i] = newNaughtyDisk(erasureDisks[i], nil, errFaultyDisk)
    		}
    		return erasureDisks
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 36.8K bytes
    - Viewed (0)
  7. cmd/auth-handler.go

    	if cred.AccessKey == "" {
    		return ErrAccessDenied
    	}
    
    	conditions := getConditionValues(r, "", cred)
    	conditions["object-lock-mode"] = []string{string(retMode)}
    	conditions["object-lock-retain-until-date"] = []string{retDate.UTC().Format(time.RFC3339)}
    	if retDays > 0 {
    		conditions["object-lock-remaining-retention-days"] = []string{strconv.Itoa(retDays)}
    	}
    	if retMode == objectlock.RetGovernance && byPassSet {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26K bytes
    - Viewed (0)
  8. cmd/bucket-object-lock.go

    					return ObjectLocked{}
    				}
    
    				if !ret.RetainUntilDate.Before(t) {
    					return ObjectLocked{}
    				}
    				return nil
    			}
    			// https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes
    			// If you try to delete objects protected by governance mode and have s3:BypassGovernanceRetention, the operation will succeed.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  9. cmd/object-api-errors.go

    	return "No bucket tags found for bucket: " + e.Bucket
    }
    
    // BucketObjectLockConfigNotFound - no bucket object lock config found
    type BucketObjectLockConfigNotFound GenericError
    
    func (e BucketObjectLockConfigNotFound) Error() string {
    	return "No bucket object lock configuration found for bucket: " + e.Bucket
    }
    
    // BucketQuotaConfigNotFound - no bucket quota config found.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  10. cmd/object_api_suite_test.go

    	globalCompressConfigMu.Lock()
    	globalCompressConfig.Enabled = false
    	globalCompressConfigMu.Unlock()
    
    	globalAutoEncryption = true
    	var err error
    	GlobalKMS, err = kms.Parse("my-minio-key:5lF+0pJM0OWwlQrvK2S/I7W9mO4a6rJJI7wzj7v09cw=")
    	if err != nil {
    		t.Fatal(err)
    	}
    }
    
    func resetCompressEncryption() {
    	// Reset...
    	globalCompressConfigMu.Lock()
    	globalCompressConfig.Enabled = false
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 32.3K bytes
    - Viewed (0)
Back to top