File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,9 @@ func getVersionAndDateError() string {
173173 releaseDate , _ := time .Parse ("2006-01-02" , ReleaseDate )
174174 days := today .Sub (releaseDate ).Hours () / 24
175175
176- if days > 7 {
176+ if days > 8 {
177177 versionOld := int (days / 7 )
178- result += fmt .Sprintf ("This provider is %v updates behind to current." , versionOld )
178+ result += fmt .Sprintf ("This provider is %v update(s) behind to current." , versionOld )
179179 }
180180 return result
181181}
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
2+ // Licensed under the Mozilla Public License v2.0
3+
4+ package oci
5+
6+ import (
7+ "testing"
8+
9+ "github.com/stretchr/testify/assert"
10+ )
11+
12+ func TestUnitGetVersionAndDateError (t * testing.T ) {
13+ versionError := getVersionAndDateError ()
14+ assert .Contains (t , versionError , "Provider version: " )
15+ assert .Contains (t , versionError , Version )
16+ assert .Contains (t , versionError , ReleaseDate )
17+ assert .NotContains (t , versionError , "update(s) behind to current" )
18+ }
You can’t perform that action at this time.
0 commit comments