Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ReadDirOrFail (0.42 sec)

  1. pkg/test/util/file/file.go

    			if filepath.Ext(d.Name()) == ext {
    				matched = true
    				break
    			}
    		}
    		if matched {
    			res = append(res, filepath.Join(filePath, d.Name()))
    		}
    	}
    	return res, nil
    }
    
    func ReadDirOrFail(t test.Failer, filePath string, extensions ...string) []string {
    	t.Helper()
    	res, err := ReadDir(filePath, extensions...)
    	if err != nil {
    		t.Fatal(err)
    	}
    	return res
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 17 02:22:22 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  2. pilot/pkg/serviceregistry/kube/controller/ambient/ambientindex_test.go

    			t.Fatalf("got duplicate address %v", addr.ResourceName())
    		}
    		got.Insert(addr.ResourceName())
    	}
    }
    
    func TestRBACConvert(t *testing.T) {
    	files := file.ReadDirOrFail(t, "testdata")
    	if len(files) == 0 {
    		// Just in case
    		t.Fatal("expected test cases")
    	}
    	for _, f := range files {
    		name := filepath.Base(f)
    		if !strings.Contains(name, "-in.yaml") {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 08 01:04:50 UTC 2024
    - 70.2K bytes
    - Viewed (0)
Back to top