Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for genyaml (0.12 sec)

  1. pilot/pkg/security/authz/model/model_test.go

    			}
    			p, _ := m.Generate(tc.forTCP, false, tc.action)
    			var gotYaml string
    			if p != nil {
    				if gotYaml, err = protomarshal.ToYAML(p); err != nil {
    					t.Fatalf("%s: failed to parse yaml: %s", tc.name, err)
    				}
    			}
    
    			for _, want := range tc.want {
    				if !strings.Contains(gotYaml, want) {
    					t.Errorf("got:\n%s but not found %s", gotYaml, want)
    				}
    			}
    			for _, notWant := range tc.notWant {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Nov 20 22:15:12 UTC 2023
    - 10K bytes
    - Viewed (0)
  2. operator/pkg/tpath/tree_test.go

    					t.Error("tt.want is set but never checked")
    				}
    				return
    			}
    
    			err := WritePathContext(pc, tt.value, false)
    			if err != nil {
    				t.Fatal(err)
    			}
    
    			gotYAML := util.ToYAML(root)
    			diff := util.YAMLDiff(gotYAML, tt.want)
    			if diff != "" {
    				t.Errorf("%s: (got:-, want:+):\n%s\n", tt.desc, diff)
    			}
    		})
    	}
    }
    
    func TestWriteNode(t *testing.T) {
    	testTreeYAML := `
    a:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 15.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/filter_test.go

    				},
    			},
    			attributes: newValidAttribute(&podObject, false),
    			results: []EvaluationResult{
    				{
    					EvalResult: celtypes.True,
    				},
    			},
    			authorizer: denyAll,
    		},
    		{
    			name: "test authorizer error",
    			validations: []ExpressionAccessor{
    				&condition{
    					Expression: "authorizer.group('').resource('endpoints').check('create').errored()",
    				},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  4. pilot/pkg/security/authz/model/generator_test.go

    				var gotYaml string
    				gotProto, ok := got.(proto.Message)
    				if !ok {
    					t.Fatal("failed to extract proto")
    				}
    				if gotYaml, err = protomarshal.ToYAML(gotProto); err != nil {
    					t.Fatalf("%s: failed to parse yaml: %s", tc.name, err)
    				}
    				t.Errorf("got:\n %v\n but want:\n %v", gotYaml, tc.want)
    			}
    		})
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Apr 20 01:58:53 UTC 2024
    - 13K bytes
    - Viewed (0)
  5. pkg/test/framework/components/istio/configmap.go

    			// Apply the change.
    			if err := update(mc); err != nil {
    				return err
    			}
    
    			// Store the updated MeshConfig back into the config map.
    			newYAML, err := injectConfigToYaml(mc)
    			if err != nil {
    				return err
    			}
    			cfgMap.Data["config"] = newYAML
    
    			// Write the config map back to the cluster.
    			if err := ic.updateConfigMap(c, cfgMap); err != nil {
    				return err
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  6. src/strings/replace_test.go

    		testCase{foo4, "", ""},
    	)
    
    	// genAll maps "\x00\x01\x02...\xfe\xff" to "[all]", amongst other things.
    	allBytes := make([]byte, 256)
    	for i := range allBytes {
    		allBytes[i] = byte(i)
    	}
    	allString := string(allBytes)
    	genAll := NewReplacer(
    		allString, "[all]",
    		"\xff", "[ff]",
    		"\x00", "[00]",
    	)
    	testCases = append(testCases,
    		testCase{genAll, allString, "[all]"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 22:53:05 UTC 2017
    - 14.1K bytes
    - Viewed (0)
  7. pilot/pkg/security/authz/builder/builder_test.go

    		t.Fatalf("got %d configs but want %d", len(gots), len(wants))
    	}
    	for i, got := range gots {
    		gotYaml, err := protomarshal.ToYAML(got)
    		if err != nil {
    			t.Fatalf("failed to convert to YAML: %v", err)
    		}
    
    		wantFile := basePath + baseDir + wants[i]
    		util.RefreshGoldenFile(t, []byte(gotYaml), wantFile)
    		want := yamlConfig(t, wantFile, forTCP)
    		wantYaml, err := protomarshal.ToYAML(want)
    		if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 22:20:44 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  8. operator/pkg/validate/common.go

    		iopYAML = util.ToYAML(un)
    	}
    	iop := &v1alpha1.IstioOperator{}
    
    	if err := yaml.UnmarshalStrict([]byte(iopYAML), iop); err != nil {
    		return nil, fmt.Errorf("%s:\n\nYAML:\n%s", err, iopYAML)
    	}
    	return iop, nil
    }
    
    // ValidIOP validates the given IstioOperator object.
    func ValidIOP(iop *v1alpha1.IstioOperator) error {
    	errs := CheckIstioOperatorSpec(iop.Spec, false)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 10 15:35:03 UTC 2023
    - 11K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1beta1_test.go

    				return
    			}
    
    			service.Deny()
    			if decision, _, _ := wh.Authorize(context.Background(), attr); decision == authorizer.DecisionAllow {
    				t.Errorf("%s: incorrectly authorized with DenyAll policy", tt.test)
    			}
    		}()
    	}
    }
    
    // recorderV1beta1Service records all access review requests.
    type recorderV1beta1Service struct {
    	last authorizationv1beta1.SubjectAccessReview
    	err  error
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 22:41:27 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  10. operator/pkg/manifest/shared.go

    	iop, err := istio.UnmarshalIstioOperator(iopsYAML, allowUnknownField)
    	if err != nil {
    		return nil, fmt.Errorf("could not unmarshal merged YAML: %s\n\nYAML:\n%s", err, iopsYAML)
    	}
    	if errs := validate.CheckIstioOperatorSpec(iop.Spec, true); len(errs) != 0 && !force {
    		l.LogAndError("Run the command with the --force flag if you want to ignore the validation error and proceed.")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 03 06:27:07 UTC 2024
    - 19.7K bytes
    - Viewed (0)
Back to top