Maint: do not mock os functions
- Use filepaths with /tmp for tests instead - Only mock functions where filepath can't be specified such as user.Lookup
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/qdm12/golibs/logging"
|
||||
"github.com/qdm12/golibs/os"
|
||||
"github.com/qdm12/golibs/params"
|
||||
)
|
||||
|
||||
@@ -62,8 +61,8 @@ var (
|
||||
|
||||
// Read obtains all configuration options for the program and returns an error as soon
|
||||
// as an error is encountered reading them.
|
||||
func (settings *Settings) Read(env params.Env, os os.OS, logger logging.Logger) (err error) {
|
||||
r := newReader(env, os, logger)
|
||||
func (settings *Settings) Read(env params.Env, logger logging.Logger) (err error) {
|
||||
r := newReader(env, logger)
|
||||
|
||||
settings.VersionInformation, err = r.env.OnOff("VERSION_INFORMATION", params.Default("on"))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user