- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for read_file (0.08 sec)
-
cni/pkg/install/cniconfig_test.go
}, } for _, c := range cases { t.Run(c.name, func(t *testing.T) { istioConf := testutils.ReadFile(t, filepath.Join("testdata", c.newConfFilename)) existingConfFilepath := filepath.Join("testdata", c.existingConfFilename) existingConf := testutils.ReadFile(t, existingConfFilepath) output, err := insertCNIConfig(istioConf, existingConf) if err != nil { if !c.expectedFailure {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 01 18:38:14 UTC 2024 - 15.3K bytes - Viewed (0) -
cmd/naughty-disk_test.go
} return d.disk.ListDir(ctx, origvolume, volume, dirPath, count) } func (d *naughtyDisk) ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error) { if err := d.calcError(); err != nil { return 0, err } return d.disk.ReadFile(ctx, volume, path, offset, buf, verifier) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Aug 12 08:38:15 UTC 2024 - 10.1K bytes - Viewed (0) -
internal/kms/config.go
// if so, decrypt it using the user-provided password. certBytes, err := os.ReadFile(certFile) if err != nil { return tls.Certificate{}, fmt.Errorf("Unable to load KES client certificate as specified by the shell environment: %v", err) } keyBytes, err := os.ReadFile(keyFile) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 11:46:39 UTC 2024 - 14.2K bytes - Viewed (0) -
cni/test/install_cni.go
// checkResult checks if resultFile is equal to expectedFile at each tick until timeout func checkResult(result, expected string) error { resultFile, err := os.ReadFile(result) if err != nil { return fmt.Errorf("couldn't read result: %v", err) } expectedFile, err := os.ReadFile(expected) if err != nil { return fmt.Errorf("couldn't read expected: %v", err) } if !bytes.Equal(resultFile, expectedFile) {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 01 18:38:14 UTC 2024 - 11.3K bytes - Viewed (0) -
src/archive/zip/writer_test.go
t.Fatalf("unexpected CreateHeader error: %v", err) } if err := w.Close(); err != nil { t.Fatalf("unexpected Close error: %v", err) } want, err := os.ReadFile("testdata/time-go.zip") if err != nil { t.Fatalf("unexpected ReadFile error: %v", err) } if got := buf.Bytes(); !bytes.Equal(got, want) { fmt.Printf("%x\n%x\n", got, want) t.Error("contents of time-go.zip differ") } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 14.4K bytes - Viewed (0) -
cni/pkg/install/install_test.go
} // check if conf file is deleted/conflist file is updated if c.chainedCNIPlugin { resultConfig := testutils.ReadFile(t, cniConfigFilePath) goldenFilepath := filepath.Join("testdata", c.expectedConfigFilename) goldenConfig := testutils.ReadFile(t, goldenFilepath) testutils.CompareBytes(t, resultConfig, goldenConfig, goldenFilepath) } else if file.Exists(cniConfigFilePath) {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jan 26 20:34:28 UTC 2024 - 11.1K bytes - Viewed (0) -
src/cmd/asm/internal/asm/endtoend_test.go
if !ok || failed { t.Errorf("asm: %s assembly failed", goarch) return } output := strings.Split(testOut.String(), "\n") // Reconstruct expected output by independently "parsing" the input. data, err := os.ReadFile(input) if err != nil { t.Error(err) return } lineno := 0 seq := 0 hexByLine := map[string]string{} lines := strings.SplitAfter(string(data), "\n") Diff: for _, line := range lines {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Dec 07 18:42:59 UTC 2023 - 11.6K bytes - Viewed (0) -
cmd/handler-api.go
const ( cgroupV1MemLimitFile = "/sys/fs/cgroup/memory/memory.limit_in_bytes" cgroupV2MemLimitFile = "/sys/fs/cgroup/memory.max" ) func cgroupMemLimit() (limit uint64) { buf, err := os.ReadFile(cgroupV2MemLimitFile) if err != nil { buf, err = os.ReadFile(cgroupV1MemLimitFile) } if err != nil { return 0 } limit, err = strconv.ParseUint(strings.TrimSpace(string(buf)), 10, 64) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 17:07:10 UTC 2024 - 10.4K bytes - Viewed (0) -
istioctl/pkg/kubeinject/kubeinject.go
return nil, nil, err } } } injector := &ExternalInjector{} if injectConfigFile != "" { injectionConfig, err := os.ReadFile(injectConfigFile) // nolint: vetshadow if err != nil { return nil, nil, err } injectConfig, err := readInjectConfigFile(injectionConfig) if err != nil {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 15 16:31:46 UTC 2024 - 21K bytes - Viewed (0) -
istioctl/pkg/describe/describe_test.go
wantException bool } // Tests Pilot /debug func TestDescribe(t *testing.T) { productPageConfigPath := "testdata/describe/http_config.json" config, err := os.ReadFile(productPageConfigPath) if err != nil { t.Fatalf("failed to read %s: %v", productPageConfigPath, err) } cases := []execAndK8sConfigTestCase{ { // case 0 args: []string{},
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 01 20:04:20 UTC 2024 - 30.8K bytes - Viewed (0)