Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 38 for testPrinter (0.3 sec)

  1. operator/pkg/util/progress/progress.go

    	return prefix + msg
    }
    
    // For testing only
    var testWriter *io.Writer
    
    func createBar() *pb.ProgressBar {
    	// Don't set a total and use Static so we can explicitly control when you write. This is needed
    	// for handling the multiline issues.
    	bar := pb.New(0)
    	bar.Set(pb.Static, true)
    	if testWriter != nil {
    		bar.SetWriter(*testWriter)
    	}
    	bar.Start()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 19:23:44 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/cmd/upgrade/common_test.go

    		},
    	}
    	for _, tt := range tcases {
    		t.Run(tt.name, func(t *testing.T) {
    			_, _, _, _, err := enforceRequirements(&pflag.FlagSet{}, &tt.flags, nil, tt.dryRun, false, &output.TextPrinter{})
    			if err == nil && len(tt.expectedErr) != 0 {
    				t.Error("Expected error, but got success")
    			}
    
    			expErr := tt.expectedErr
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/cli-runtime/pkg/printers/jsonpath_test.go

    package printers
    
    import (
    	"bytes"
    	"testing"
    
    	v1 "k8s.io/api/core/v1"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/apimachinery/pkg/util/sets"
    )
    
    func TestPrinters(t *testing.T) {
    	om := func(name string) metav1.ObjectMeta { return metav1.ObjectMeta{Name: name} }
    
    	jsonpathPrinter, err := NewJSONPathPrinter("{.metadata.name}")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 15 21:58:20 UTC 2020
    - 2.1K bytes
    - Viewed (0)
  4. operator/pkg/util/progress/progress_test.go

    package progress
    
    import (
    	"bytes"
    	"io"
    	"testing"
    
    	"istio.io/istio/operator/pkg/name"
    )
    
    func TestProgressLog(t *testing.T) {
    	buf := bytes.NewBuffer(nil)
    	testBuf := io.Writer(buf)
    	testWriter = &testBuf
    	expected := ""
    	expect := func(e string) {
    		t.Helper()
    		// In buffer mode we don't overwrite old data, so we are constantly appending to the expected
    		newExpected := expected + "\n" + e
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 19:23:44 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  5. .gitignore

    pilot/pkg/kube/config
    pilot/pkg/proxy/envoy/envoy
    # lint
    lintconfig.gen.json
    .istiorc
    .istiorc.mk
    # codegen stuff
    bin/adapterlinter
    bin/protoc-gen-gogoslick*
    bin/protoc-min-version*
    bin/protoc-gen-docs*
    bin/testlinter
    bin/envvarlinter
    bin/istioctl
    *.orig
    # Avoid accidental istio.VERSION changes
    istio.VERSION
    LICENSES.txt
    # Proxy generated proxy config in integration test
    tests/integration/component/proxy/envoy.conf
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 21 21:20:01 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/CharSourceTest.java

        assertEquals(ImmutableList.of("foo"), list);
        assertTrue(lines.wasStreamOpened() && lines.wasStreamClosed());
      }
    
      public void testCopyToAppendable_doesNotCloseIfWriter() throws IOException {
        TestWriter writer = new TestWriter();
        assertFalse(writer.closed());
        source.copyTo(writer);
        assertFalse(writer.closed());
      }
    
      public void testClosesOnErrors_copyingToCharSinkThatThrows() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  7. istioctl/pkg/writer/table/writer_test.go

    	version   string
    }
    
    var newTestObject = func(name, namespace, version string) testObject {
    	return testObject{
    		name:      name,
    		namespace: namespace,
    		version:   version,
    	}
    }
    
    func TestWriter(t *testing.T) {
    	got := &bytes.Buffer{}
    	w := NewStyleWriter(got)
    	w.AddHeader("NAME", "NAMESPACE", "VERSION")
    	w.SetAddRowFunc(func(obj interface{}) Row {
    		o := obj.(testObject)
    		return Row{
    			Cells: []Cell{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Oct 08 04:41:42 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  8. src/internal/weak/pointer_test.go

    	"testing"
    )
    
    type T struct {
    	// N.B. This must contain a pointer, otherwise the weak handle might get placed
    	// in a tiny block making the tests in this package flaky.
    	t *T
    	a int
    }
    
    func TestPointer(t *testing.T) {
    	bt := new(T)
    	wt := weak.Make(bt)
    	if st := wt.Strong(); st != bt {
    		t.Fatalf("weak pointer is not the same as strong pointer: %p vs. %p", st, bt)
    	}
    	// bt is still referenced.
    	runtime.GC()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/cmd/certs.go

    				client, _ := kubeconfigutil.ClientSetFromFile(flags.kubeconfigPath)
    				internalcfg, err := getInternalCfg(flags.cfgPath, client, flags.cfg, &output.TextPrinter{}, "renew")
    				if err != nil {
    					return err
    				}
    
    				return renewCert(kdir, internalcfg, handler)
    			}
    		}(handler)
    		// install the implementation into the command
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  10. src/mime/multipart/writer_test.go

    // license that can be found in the LICENSE file.
    
    package multipart
    
    import (
    	"bytes"
    	"io"
    	"mime"
    	"net/textproto"
    	"strings"
    	"testing"
    )
    
    func TestWriter(t *testing.T) {
    	fileContents := []byte("my file contents")
    
    	var b bytes.Buffer
    	w := NewWriter(&b)
    	{
    		part, err := w.CreateFormFile("myfile", "my-file.txt")
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 17:36:47 UTC 2022
    - 4.1K bytes
    - Viewed (0)
Back to top