- Sort Score
- Result 10 results
- Languages All
Results 151 - 160 of 1,126 for testCases (0.15 sec)
-
internal/hash/reader_test.go
success: false, }, } for i, testCase := range testCases { t.Run(fmt.Sprintf("case-%d", i+1), func(t *testing.T) { _, err := NewReader(context.Background(), testCase.src, testCase.size, testCase.md5hex, testCase.sha256hex, testCase.actualSize) if err != nil && testCase.success { t.Errorf("Test %q: Expected success, but got error %s instead", testCase.desc, err) } if err == nil && !testCase.success {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Sep 18 17:00:54 UTC 2023 - 10.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics_test.go
}, expectedScope: "cluster", }, } for _, test := range testCases { t.Run(test.name, func(t *testing.T) { if CleanScope(test.requestInfo) != test.expectedScope { t.Errorf("failed to clean scope: %v", test.requestInfo) } }) } } func TestCleanFieldValidation(t *testing.T) { testCases := []struct { name string url *url.URL
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 27 07:29:19 UTC 2023 - 14.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation_encryption_test.go
"k8s.io/apiserver/pkg/apis/apiserver" ) func TestStructure(t *testing.T) { root := field.NewPath("resources") firstResourcePath := root.Index(0) cacheSize := int32(1) testCases := []struct { desc string in *apiserver.EncryptionConfiguration reload bool want field.ErrorList }{{ desc: "nil encryption config", in: nil, want: field.ErrorList{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Dec 18 20:54:24 UTC 2023 - 33.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/labels/selector_test.go
} for _, testcase := range testcases { p := &Parser{l: &Lexer{s: testcase.token, pos: 0}, position: 0} p.scan() _, err := p.parseOperator() if ok := reflect.DeepEqual(testcase.expectedError, err); !ok { t.Errorf("\nexpect err [%v], \nactual err [%v]", testcase.expectedError, err) } } } func TestRequirementConstructor(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 14 16:39:04 UTC 2022 - 29.9K bytes - Viewed (0) -
cmd/kubeadm/app/cmd/version_test.go
} } func TestRunVersion(t *testing.T) { var buf bytes.Buffer iface := make(map[string]interface{}) flagNameOutput := "output" cmd := newCmdVersion(&buf) testCases := []struct { name string flag string expectedError bool shouldBeValidYAML bool shouldBeValidJSON bool }{ { name: "valid: run without flags", }, {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 17 14:40:46 UTC 2021 - 2.3K bytes - Viewed (0) -
pkg/util/kernel/version_test.go
*/ package kernel import ( "errors" "testing" "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/util/version" ) func TestGetVersion(t *testing.T) { testCases := []struct { name string readFileFunc readFileFunc expected *version.Version err error }{ { name: "valid os-release file", readFileFunc: func(_ string) ([]byte, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 27 19:24:34 UTC 2023 - 2.2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/meta/errors_test.go
limitations under the License. */ package meta import ( "errors" "fmt" "testing" "k8s.io/apimachinery/pkg/runtime/schema" ) func TestErrorMatching(t *testing.T) { testCases := []struct { name string // input should contain an error that is _not_ empty, otherwise the naive reflectlite.DeepEqual matching of
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 11 22:50:51 UTC 2022 - 2.4K bytes - Viewed (0) -
pkg/test/framework/components/namespace/namespace_test.go
// limitations under the License. package namespace import ( "testing" . "github.com/onsi/gomega" ) func TestConfigRevisionOverwrite(t *testing.T) { testCases := []struct { name string // test inputs. revision string cfg Config // expected results. wantRevision string }{ { name: "NoOverwriteEmptyInput", revision: "",
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 31 14:48:28 UTC 2023 - 1.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/net/util_test.go
getIPNet("10.0.0.0/24"), false, }, } for _, tc := range testCases { if tc.expect != IPNetEqual(tc.ipnet1, tc.ipnet2) { t.Errorf("Expect equality of %s and %s be to %v", tc.ipnet1.String(), tc.ipnet2.String(), tc.expect) } } } func TestIsConnectionRefused(t *testing.T) { testCases := []struct { err error expect bool }{ {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 20 19:02:55 UTC 2023 - 4.3K bytes - Viewed (0) -
internal/bucket/lifecycle/noncurrentversion_test.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package lifecycle import "testing" func Test_NoncurrentVersionsExpiration_Validation(t *testing.T) { testcases := []struct { n NoncurrentVersionExpiration err error }{ { n: NoncurrentVersionExpiration{ NoncurrentDays: 0, NewerNoncurrentVersions: 0, set: true, },
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Dec 14 17:41:44 UTC 2021 - 2.1K bytes - Viewed (0)