Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for CompareContent (0.19 sec)

  1. istioctl/pkg/writer/envoy/configdump/ecds_test.go

    	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)
    	err := cw.PrintEcds("yaml")
    	assert.NoError(t, err)
    
    	util.CompareContent(t, gotOut.Bytes(), "testdata/ecds/output.yaml")
    }
    
    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)
  2. cni/pkg/install/kubeconfig_test.go

    				t.Fatalf("expected failure")
    			}
    
    			goldenFilepath := "testdata/kubeconfig-tls"
    			if c.skipTLSVerify {
    				goldenFilepath = "testdata/kubeconfig-skip-tls"
    			}
    
    			testutils.CompareContent(t, []byte(result.Full), goldenFilepath)
    		})
    	}
    }
    
    func TestReplaceInvalidKubeconfigFile(t *testing.T) {
    	tmp := t.TempDir()
    	os.WriteFile(filepath.Join(tmp, "token"), []byte(saToken), 0o644)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 03:52:24 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/ztunnel/configdump/configdump_test.go

    					t.Errorf("PrintSecretSummary (%v) did not produce expected err", tt.name)
    				} else if err != nil && !tt.wantErr {
    					t.Errorf("PrintSecretSummary (%v) produced unexpected err: %v", tt.name, err)
    				}
    				util.CompareContent(t, gotOut.Bytes(), tt.wantOutputSecret)
    			}
    			if tt.wantOutputWorkload != "" {
    				wf := WorkloadFilter{Verbose: true}
    				if tt.configNamespace != "" {
    					wf.Namespace = tt.configNamespace
    				}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Feb 02 18:21:48 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  4. istioctl/pkg/writer/envoy/configdump/configdump_test.go

    			cw := &ConfigWriter{Stdout: gotOut}
    			cd, _ := os.ReadFile("testdata/configdump.json")
    			if tt.callPrime {
    				cw.Prime(cd)
    			}
    			err := cw.PrintBootstrapDump("json")
    			if tt.wantOutputFile != "" {
    				util.CompareContent(t, gotOut.Bytes(), tt.wantOutputFile)
    			}
    			if err == nil && tt.wantErr {
    				t.Errorf("PrintBootstrapDump (%v) did not produce expected err", tt.name)
    			} else if err != nil && !tt.wantErr {
    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)
  5. istioctl/pkg/writer/envoy/configdump/endpoint_test.go

    			cw.Prime(cd)
    			err := cw.PrintEndpointsSummary(tt.filter)
    			assert.NoError(t, err)
    
    			wantOutputFile := path.Join("testdata/endpoint", fmt.Sprintf("%s_output.txt", tt.name))
    			util.CompareContent(t, gotOut.Bytes(), wantOutputFile)
    		})
    	}
    }
    
    func TestPrintEndpoints(t *testing.T) {
    	tests := []struct {
    		name         string
    		outputFormat string
    		filter       EndpointFilter
    	}{
    		{
    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)
  6. istioctl/pkg/util/testutil/util.go

    		t.Fatalf("Output didn't match for '%s %s'\n got %v\nwant: %v", cmd.Name(),
    			strings.Join(c.Args, " "), output, c.ExpectedRegexp)
    	}
    
    	if c.GoldenFilename != "" {
    		util.CompareContent(t, []byte(output), c.GoldenFilename)
    	}
    
    	if c.WantException {
    		if fErr == nil {
    			t.Fatalf("Wanted an exception for 'istioctl %s', didn't get one, output was %q",
    				strings.Join(c.Args, " "), output)
    		}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 2K bytes
    - Viewed (0)
  7. istioctl/pkg/writer/envoy/configdump/route_test.go

    			}
    			err := cw.PrintRouteSummary(RouteFilter{Verbose: true})
    			assert.NoError(t, err)
    
    			wantOutputFile := path.Join("testdata/routes", tt.name, "output.txt")
    			util.CompareContent(t, gotOut.Bytes(), wantOutputFile)
    		})
    	}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Nov 29 12:37:14 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  8. cni/pkg/iptables/iptables_test.go

    	t.Helper()
    	gotBytes := []byte(strings.Join(actual, "\n"))
    	goldenFile := filepath.Join("testdata", name+".golden")
    	if ipv6 {
    		goldenFile = filepath.Join("testdata", name+"_ipv6.golden")
    	}
    	testutil.CompareContent(t, gotBytes, goldenFile)
    }
    
    func constructTestConfig() *Config {
    	return &Config{
    		RestoreFormat: false,
    	}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Mar 11 17:46:23 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  9. istioctl/pkg/workload/workload_test.go

    				contents := util.ReadFile(t, path.Join(testdir, f.Name()))
    				goldenFile := path.Join(testdir, f.Name()+goldenSuffix)
    				util.RefreshGoldenFile(t, contents, goldenFile)
    				util.CompareContent(t, contents, goldenFile)
    			})
    		}
    	}
    }
    
    func TestConvertToMap(t *testing.T) {
    	tests := []struct {
    		name string
    		arg  []string
    		want map[string]string
    	}{
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Mar 27 16:59:05 GMT 2024
    - 14.6K bytes
    - Viewed (0)
Back to top