Add 1.13 support. Fix tests to enable 1.13 support

This commit is contained in:
Milos Gajdos
2019-09-27 17:14:24 +01:00
parent da572041ca
commit 87a5e85062
4 changed files with 6 additions and 5 deletions

View File

@@ -12,13 +12,14 @@ var (
dbpw = flag.String("database-password", "", "db pw")
)
func init() {
func initTestFlags() {
flag.Set("database-host", "localhost")
flag.Set("database-password", "some-password")
flag.Parse()
}
func TestFlagsrc_Read(t *testing.T) {
initTestFlags()
source := NewSource()
c, err := source.Read()
if err != nil {
@@ -46,6 +47,7 @@ func TestFlagsrc_Read(t *testing.T) {
}
func TestFlagsrc_ReadAll(t *testing.T) {
initTestFlags()
source := NewSource(IncludeUnset(true))
c, err := source.Read()
if err != nil {