- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 170 for readFile (0.17 sec)
-
istioctl/pkg/writer/envoy/configdump/configdump_test.go
inputFile: "", wantConfigs: 0, wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { cw := &ConfigWriter{} cd, _ := os.ReadFile(tt.inputFile) err := cw.Prime(cd) if cw.configDump == nil { if tt.wantConfigs != 0 { t.Errorf("wanted some configs loaded but config dump was nil") }
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Wed Jan 03 23:08:06 GMT 2024 - 3.5K 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) {
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 11.1K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/ecds_test.go
cw := &ConfigWriter{Stdout: gotOut} cd, _ := os.ReadFile("testdata/ecds/configdump.json") cw.Prime(cd) err := cw.PrintEcdsSummary() assert.NoError(t, err) util.CompareContent(t, gotOut.Bytes(), "testdata/ecds/output.txt") } func TestPrintEcdsYaml(t *testing.T) { gotOut := &bytes.Buffer{} cw := &ConfigWriter{Stdout: gotOut} cd, _ := os.ReadFile("testdata/ecds/configdump.json") cw.Prime(cd)
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Tue Dec 13 01:08:07 GMT 2022 - 1.9K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/endpoint_test.go
filter: EndpointFilter{ Port: 8080, }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { gotOut := &bytes.Buffer{} cw := &ConfigWriter{Stdout: gotOut} cd, _ := os.ReadFile("testdata/endpoint/configdump.json") cw.Prime(cd) err := cw.PrintEndpointsSummary(tt.filter) assert.NoError(t, err) wantOutputFile := path.Join("testdata/endpoint", fmt.Sprintf("%s_output.txt", tt.name))
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Tue Jul 12 02:25:59 GMT 2022 - 2.4K 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{},
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Thu Mar 28 09:54:01 GMT 2024 - 30.4K bytes - Viewed (0) -
operator/cmd/mesh/operator_test.go
} if refreshGoldenFiles() { t.Logf("Refreshing golden file for %s", goldenFilepath) if err := os.WriteFile(goldenFilepath, []byte(gotYAML), 0o644); err != nil { t.Error(err) } } wantYAML, err := readFile(goldenFilepath) if err != nil { t.Fatal(err) } if diff := util.YAMLDiff(wantYAML, gotYAML); diff != "" { t.Fatalf("diff: %s", diff) } } func TestOperatorDumpJSONFormat(t *testing.T) {
Go - Registered: Wed Mar 20 22:53:08 GMT 2024 - Last Modified: Tue Aug 29 14:15:33 GMT 2023 - 6.4K 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) {
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 12.5K bytes - Viewed (0) -
cni/pkg/install/cniconfig.go
return writeCNIConfig(ctx, cniConfig, getPluginConfig(cfg)) } func readCNIConfigTemplate(template cniConfigTemplate) ([]byte, error) { if file.Exists(template.cniNetworkConfigFile) { cniConfig, err := os.ReadFile(template.cniNetworkConfigFile) if err != nil { return nil, err } installLog.Infof("Using CNI config template from %s", template.cniNetworkConfigFile) return cniConfig, nil }
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 10.4K bytes - Viewed (0) -
cni/pkg/plugin/plugin_dryrun_test.go
generated, err := os.ReadFile(outputFilePath) if err != nil { log.Fatalf("Cannot read generated IPTables rule file: %v", err) } generatedRules := getRules(generated) refreshGoldens(t, tt.golden, generatedRules) // Compare generated iptables rule with golden files. golden, err := os.ReadFile(tt.golden) if err != nil {
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Sat Feb 10 00:31:55 GMT 2024 - 8.4K bytes - Viewed (0) -
istioctl/pkg/proxyconfig/proxyconfig_test.go
expectedString string // String output is expected to contain wantException bool } func TestProxyConfig(t *testing.T) { loggingConfig := map[string][]byte{ "details-v1-5b7f94f9bc-wp5tb": util.ReadFile(t, "../writer/envoy/logging/testdata/logging.txt"), "httpbin-794b576b6c-qx6pf": []byte("{}"), } cases := []execTestCase{ { args: []string{},
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Wed Apr 10 21:51:29 GMT 2024 - 8.9K bytes - Viewed (0)