Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for AsBytesOrFail (0.46 sec)

  1. pkg/test/util/file/file.go

    )
    
    // AsBytes is a simple wrapper around os.ReadFile provided for completeness.
    func AsBytes(filename string) ([]byte, error) {
    	return os.ReadFile(filename)
    }
    
    // AsBytesOrFail calls AsBytes and fails the test if any errors occurred.
    func AsBytesOrFail(t test.Failer, filename string) []byte {
    	t.Helper()
    	content, err := AsBytes(filename)
    	if err != nil {
    		t.Fatal(err)
    	}
    	return content
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 17 02:22:22 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  2. pkg/kube/inject/webhook_test.go

    }
    
    func readInjectionSettings(t testing.TB, fname string) (*Config, ValuesConfig, *meshconfig.MeshConfig) {
    	values := file.AsStringOrFail(t, filepath.Join("testdata", "inputs", fname+".values.gen.yaml"))
    	template := file.AsBytesOrFail(t, filepath.Join("testdata", "inputs", fname+".template.gen.yaml"))
    	meshc := file.AsStringOrFail(t, filepath.Join("testdata", "inputs", fname+".mesh.gen.yaml"))
    
    	vc, err := NewValuesConfig(values)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 39K bytes
    - Viewed (1)
Back to top