summaryrefslogtreecommitdiff
path: root/pkg/util/utils_test.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2021-08-11 21:03:29 +0000
committerGitHub <noreply@github.com>2021-08-11 21:03:29 +0000
commit63269b60fe7f928c29439357177ab56242723258 (patch)
treed54633e92f854dfe9f5e0e0361e46e35c2dcfe7d /pkg/util/utils_test.go
parent922699f0a1983f3f77946cef2fba934d80afdb6f (diff)
parent7442f0b858e5fe2d7922b3b5714030fda5b2646e (diff)
downloadpodman-63269b60fe7f928c29439357177ab56242723258.tar.gz
podman-63269b60fe7f928c29439357177ab56242723258.tar.bz2
podman-63269b60fe7f928c29439357177ab56242723258.zip
Merge pull request #11193 from mheon/release_notes_33
Release notes for Podman v3.3.0-RC2
Diffstat (limited to 'pkg/util/utils_test.go')
-rw-r--r--pkg/util/utils_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/util/utils_test.go b/pkg/util/utils_test.go
index cb737bd76..027acbdab 100644
--- a/pkg/util/utils_test.go
+++ b/pkg/util/utils_test.go
@@ -2,6 +2,7 @@ package util
import (
"testing"
+ "time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -277,3 +278,17 @@ func TestPeriodAndQuotaToCores(t *testing.T) {
assert.Equal(t, PeriodAndQuotaToCores(period, quota), expectedCores)
}
+
+func TestParseInputTime(t *testing.T) {
+ tm, err := ParseInputTime("1.5")
+ if err != nil {
+ t.Errorf("expected error to be nil but was: %v", err)
+ }
+
+ expected, err := time.ParseInLocation(time.RFC3339Nano, "1970-01-01T00:00:01.500000000Z", time.UTC)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ assert.Equal(t, expected, tm)
+}