Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ParseConfigs (0.35 sec)

  1. pkg/test/framework/components/echo/deployment/flags.go

    	}
    	yml, err := os.ReadFile(path)
    	if err != nil {
    		return err
    	}
    	out, err := echo.ParseConfigs(yml)
    	if err != nil {
    		return err
    	}
    	*c = out
    	return nil
    }
    
    func (c *configs) SetConfig(m any) error {
    	yml, err := yaml.Marshal(m)
    	if err != nil {
    		return err
    	}
    	out, err := echo.ParseConfigs(yml)
    	if err != nil {
    		return err
    	}
    	*c = out
    	return nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  2. pkg/test/framework/components/echo/config_test.go

    package echo
    
    import (
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    
    	"istio.io/istio/pkg/test/framework/components/namespace"
    )
    
    func TestParseConfigs(t *testing.T) {
    	cfgs, err := ParseConfigs([]byte(`
    - Service: "foo"
      Namespace: "bar"
      DeployAsVM: true
      VMDistro: "Centos8"
    `))
    	if err != nil {
    		t.Fatal(err)
    	}
    	if diff := cmp.Diff(cfgs, []Config{{
    		Service:    "foo",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 03 21:37:39 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  3. pkg/test/framework/components/echo/config.go

    		// Therefore, this should never happen
    		panic(err)
    	}
    	return copied
    }
    
    // ParseConfigs unmarshals the given YAML bytes into []Config, using a namespace.Static rather
    // than attempting to Claim the configured namespace.
    func ParseConfigs(bytes []byte) ([]Config, error) {
    	// parse into flexible type, so we can remove Namespace and parse that ourselves
    	raw := make([]map[string]any, 0)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 12:26:52 UTC 2024
    - 18.2K bytes
    - Viewed (0)
Back to top