From a298cfcee1c11850e30efbb37b8edab70a1e3c90 Mon Sep 17 00:00:00 2001 From: Dean Karn Date: Sat, 29 Jul 2017 21:56:23 -0700 Subject: [PATCH] Backport false possitive test fixes --- README.md | 8 ++------ validator_test.go | 8 ++++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c7da488..d3bd9b0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ Package validator ================ - -[![Join the chat at https://gitter.im/bluesuncorp/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -![Project status](https://img.shields.io/badge/version-8.18.1-green.svg) +[![Join the chat at https://gitter.im/bluesuncorp/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +![Project status](https://img.shields.io/badge/version-8.18.2-green.svg) [![Build Status](https://semaphoreci.com/api/v1/projects/ec20115f-ef1b-4c7d-9393-cc76aba74eb4/530054/badge.svg)](https://semaphoreci.com/joeybloggs/validator) [![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=v8&service=github)](https://coveralls.io/github/go-playground/validator?branch=v8) [![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator) @@ -11,9 +10,6 @@ Package validator Package validator implements value validations for structs and individual fields based on tags. -### Announcement -Validator [v9.0.0 RC1](https://github.com/go-playground/validator/releases/tag/v9.0.0RC1) has been released, please let me know what you think [here](https://github.com/go-playground/validator/issues/250) - It has the following **unique** features: - Cross Field and Cross Struct validations by using validation tags or custom validators. diff --git a/validator_test.go b/validator_test.go index ee61527..3629acc 100644 --- a/validator_test.go +++ b/validator_test.go @@ -4839,7 +4839,7 @@ func TestIsGt(t *testing.T) { errs = validate.Field(tm, "gt") Equal(t, errs, nil) - t2 := time.Now().UTC() + t2 := time.Now().UTC().Add(-time.Hour) errs = validate.Field(t2, "gt") NotEqual(t, errs, nil) @@ -4875,7 +4875,7 @@ func TestIsGte(t *testing.T) { errs := validate.Field(t1, "gte") Equal(t, errs, nil) - t2 := time.Now().UTC() + t2 := time.Now().UTC().Add(-time.Hour) errs = validate.Field(t2, "gte") NotEqual(t, errs, nil) @@ -4920,7 +4920,7 @@ func TestIsLt(t *testing.T) { i := true PanicMatches(t, func() { validate.Field(i, "lt") }, "Bad field type bool") - t1 := time.Now().UTC() + t1 := time.Now().UTC().Add(-time.Hour) errs = validate.Field(t1, "lt") Equal(t, errs, nil) @@ -4957,7 +4957,7 @@ func TestIsLte(t *testing.T) { i := true PanicMatches(t, func() { validate.Field(i, "lte") }, "Bad field type bool") - t1 := time.Now().UTC() + t1 := time.Now().UTC().Add(-time.Hour) errs := validate.Field(t1, "lte") Equal(t, errs, nil)