Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 93 for Assert (0.18 sec)

  1. cni/pkg/nodeagent/ztunnelserver_test.go

    	mt.Assert(ztunnelConnected.Name(), nil, monitortest.Exactly(1))
    
    	// we should get the fd to dev null. note that we can't assert the fd number
    	// as the kernel may have given us a different number that refers to the same file.
    	assert.Equal(t, len(fds), 1)
    	// in theory we should close the fd, but it's just a test..
    
    	assert.Equal(t, m.Payload.(*zdsapi.WorkloadRequest_Add).Add.Uid, uid)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/healthServer_test.go

    	installReady.Store(true)
    	watchReady.Store(true)
    	assert.Equal(t, installReady.Load(), true)
    	assert.Equal(t, watchReady.Load(), true)
    
    	makeReq(t, server.URL, constants.LivenessEndpoint, http.StatusOK)
    	makeReq(t, server.URL, constants.ReadinessEndpoint, http.StatusOK)
    
    	watchReady.Store(false)
    	assert.Equal(t, watchReady.Load(), false)
    	assert.Equal(t, installReady.Load(), true)
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 2K bytes
    - Viewed (0)
  3. cni/pkg/util/podutil_test.go

    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestGetPodIPIfPodIPPresent(t *testing.T) {
    	pod := &corev1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "test",
    			Namespace: "test",
    		},
    		Spec: corev1.PodSpec{
    			NodeName: "derp",
    		},
    		Status: corev1.PodStatus{
    			PodIP: "11.1.1.12",
    		},
    	}
    
    	podIPs := GetPodIPsIfPresent(pod)
    	assert.Equal(t, len(podIPs), 1)
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed May 01 18:04:40 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  4. istioctl/pkg/writer/ztunnel/configdump/configdump_test.go

    				}
    			} else if len(cw.ztunnelDump.Workloads) != tt.wantConfigs {
    				t.Errorf("wanted %v configs loaded in got %v", tt.wantConfigs, len(cw.ztunnelDump.Workloads))
    			}
    			if tt.wantErr {
    				assert.Error(t, err)
    			} else {
    				assert.NoError(t, err)
    			}
    		})
    	}
    }
    
    func TestConfigWriter_PrintSecretSummary(t *testing.T) {
    	tests := []struct {
    		name               string
    		wantOutputSecret   string
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Feb 02 18:21:48 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  5. cni/pkg/repair/repair_test.go

    			tt.config.LabelPods = true
    			c, err := NewRepairController(tt.client, tt.config)
    			assert.NoError(t, err)
    			t.Cleanup(func() {
    				assert.NoError(t, c.queue.WaitForClose(time.Second))
    			})
    			stop := test.NewStop(t)
    			tt.client.RunAndWait(stop)
    			go c.Run(stop)
    			kube.WaitForCacheSync("test", stop, c.queue.HasSynced)
    
    			assert.EventuallyEqual(t, func() map[string]string {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Oct 24 03:31:28 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  6. istioctl/pkg/writer/pilot/status_test.go

    			input := map[string]*discovery.DiscoveryResponse{}
    			for key, ss := range tt.input {
    				input[key] = ss
    			}
    
    			err := sw.PrintAll(input)
    			if tt.wantErr {
    				assert.Error(t, err)
    			} else {
    				assert.NoError(t, err)
    			}
    			want, _ := os.ReadFile(tt.want)
    			if err := util.Compare(got.Bytes(), want); err != nil {
    				t.Errorf(err.Error())
    			}
    		})
    	}
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  7. cmd/admin-handlers-users_test.go

    	}
    	groupInfo, err := s.adm.GetGroupDescription(ctx, group)
    	if err != nil {
    		c.Fatalf("group desc err: %v", err)
    	}
    	c.Assert(groupInfo.Name, group)
    	c.Assert(set.CreateStringSet(groupInfo.Members...), set.CreateStringSet(accessKey))
    	c.Assert(groupInfo.Policy, policy)
    	c.Assert(groupInfo.Status, string(madmin.GroupEnabled))
    
    	// 5. Disable/enable the group and verify that user access is revoked/restored.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 12 16:36:16 GMT 2024
    - 45.7K bytes
    - Viewed (0)
  8. istioctl/pkg/writer/envoy/configdump/configdump_test.go

    				}
    			} else if len(cw.configDump.Configs) != tt.wantConfigs {
    				t.Errorf("wanted %v configs loaded in got %v", tt.wantConfigs, len(cw.configDump.Configs))
    			}
    			if tt.wantErr {
    				assert.Error(t, err)
    			} else {
    				assert.NoError(t, err)
    			}
    		})
    	}
    }
    
    func TestConfigWriter_PrintBootstrapDump(t *testing.T) {
    	tests := []struct {
    		name           string
    		wantOutputFile string
    		callPrime      bool
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Jan 03 23:08:06 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  9. cni/pkg/install/binaries_test.go

    				contents := file.AsStringOrFail(t, filepath.Join(targetDir, filename))
    				assert.Equal(t, contents, expectedContents)
    
    				wasCopied := false
    				for _, bin := range binariesCopied.UnsortedList() {
    					if bin == filename {
    						wasCopied = true
    					}
    				}
    				assert.Equal(t, wasCopied, true)
    			}
    		})
    	}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Jul 20 18:34:43 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/envoy/configdump/route_test.go

    // limitations under the License.
    
    package configdump
    
    import (
    	"bytes"
    	"fmt"
    	"os"
    	"path"
    	"testing"
    
    	"istio.io/istio/pilot/test/util"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestDescribeRouteDomains(t *testing.T) {
    	tests := []struct {
    		desc     string
    		domains  []string
    		expected string
    	}{
    		{
    			desc:     "test zero domain",
    			domains:  []string{},
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Nov 29 12:37:14 GMT 2023
    - 2.8K bytes
    - Viewed (0)
Back to top