Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • v1.0.0
  • v1.0.1
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.11.1
  • v1.11.2
  • v1.11.3
  • v1.11.4
  • v1.12.0
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.16.0
  • v1.17.1
  • v1.17.2
  • v1.17.3
  • v1.17.4
  • v1.17.5
  • v1.17.6
  • v1.17.7
  • v1.18.0
  • v1.18.1
  • v1.18.2
  • v1.18.3
  • v1.19.0
  • v1.2.0
  • v1.20.0
  • v1.20.1
  • v1.20.2
  • v1.20.3
  • v1.20.4
  • v1.20.5
  • v1.21.0
  • v1.22.0
  • v1.22.1
  • v1.22.3
  • v1.22.4
  • v1.22.5
  • v1.22.6
  • v1.22.7
  • v1.22.8
  • v1.22.9
  • v1.3.0
  • v1.4.0
  • v1.4.1
  • v1.4.2
  • v1.4.3
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.7.1
  • v1.8.0
  • v1.9.0
55 results

Target

Select target project
  • oss/libraries/go/application/configuration
1 result
Select Git revision
  • master
  • v1.0.0
  • v1.0.1
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.11.1
  • v1.11.2
  • v1.11.3
  • v1.11.4
  • v1.12.0
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.16.0
  • v1.17.1
  • v1.17.2
  • v1.17.3
  • v1.17.4
  • v1.17.5
  • v1.17.6
  • v1.17.7
  • v1.18.0
  • v1.18.1
  • v1.18.2
  • v1.18.3
  • v1.19.0
  • v1.2.0
  • v1.20.0
  • v1.20.1
  • v1.20.2
  • v1.20.3
  • v1.20.4
  • v1.20.5
  • v1.21.0
  • v1.22.0
  • v1.22.1
  • v1.22.3
  • v1.22.4
  • v1.22.5
  • v1.22.6
  • v1.22.7
  • v1.22.8
  • v1.22.9
  • v1.3.0
  • v1.4.0
  • v1.4.1
  • v1.4.2
  • v1.4.3
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.7.1
  • v1.8.0
  • v1.9.0
55 results
Show changes
Commits on Source (2)
...@@ -38,7 +38,7 @@ func (s *setting[C]) SetMnemonic(mnemonic string) *setting[C] { ...@@ -38,7 +38,7 @@ func (s *setting[C]) SetMnemonic(mnemonic string) *setting[C] {
} }
// Check if the setting contains errors // Check if the setting contains errors
func (s *setting[C]) HasError() bool { func (s *setting[C]) HasErrors() bool {
return len(s.errors) > 0 return len(s.errors) > 0
} }
......
...@@ -69,7 +69,7 @@ func TestCangeOnChange(t *testing.T) { ...@@ -69,7 +69,7 @@ func TestCangeOnChange(t *testing.T) {
s.Import() s.Import()
if s.HasError() { if s.HasErrors() {
t.Error("Expected not error", s.Errors()) t.Error("Expected not error", s.Errors())
} }
......
...@@ -50,7 +50,7 @@ func newUnsupportedTypeError(t reflect.Type) UnsupportedTypeError { ...@@ -50,7 +50,7 @@ func newUnsupportedTypeError(t reflect.Type) UnsupportedTypeError {
} }
// ResetError is used to reset the error to nil // ResetError is used to reset the error to nil
// After calling this function, the call HasError() will return false // After calling this function, the call HasErrors() will return false
func (s *setting[C]) ResetErrors() *setting[C] { func (s *setting[C]) ResetErrors() *setting[C] {
s.errors = []error{} s.errors = []error{}
return s return s
......
...@@ -14,11 +14,11 @@ func TestResetErrors(t *testing.T) { ...@@ -14,11 +14,11 @@ func TestResetErrors(t *testing.T) {
c := New(defaults) c := New(defaults)
assert.False(t, c.HasError()) assert.False(t, c.HasErrors())
c.SetDefaultDirectories() c.SetDefaultDirectories()
assert.True(t, c.HasError()) assert.True(t, c.HasErrors())
c.ResetErrors() c.ResetErrors()
assert.False(t, c.HasError()) assert.False(t, c.HasErrors())
} }
func TestNewFlagDoesNotExistError(t *testing.T) { func TestNewFlagDoesNotExistError(t *testing.T) {
......
...@@ -21,7 +21,7 @@ func TestWrite(t *testing.T) { ...@@ -21,7 +21,7 @@ func TestWrite(t *testing.T) {
s.Write(x, f) s.Write(x, f)
if s.HasError() { if s.HasErrors() {
t.Error(s.Errors()) t.Error(s.Errors())
s.ResetErrors() s.ResetErrors()
continue continue
......
...@@ -167,7 +167,7 @@ func TestAddDirectoryMissingMnemonic(t *testing.T) { ...@@ -167,7 +167,7 @@ func TestAddDirectoryMissingMnemonic(t *testing.T) {
c := New(cfg) c := New(cfg)
c.AddEtcDirectory() c.AddEtcDirectory()
if !c.HasError() { if !c.HasErrors() {
t.Error("Expected error") t.Error("Expected error")
} }
...@@ -260,7 +260,7 @@ func TestSetFileFormat(t *testing.T) { ...@@ -260,7 +260,7 @@ func TestSetFileFormat(t *testing.T) {
c := New(cfg) c := New(cfg)
c.SetFileFormat(Yaml) c.SetFileFormat(Yaml)
if c.HasError() { if c.HasErrors() {
t.Error("Expected not error") t.Error("Expected not error")
} }
...@@ -273,7 +273,7 @@ func TestSetFileFormatError(t *testing.T) { ...@@ -273,7 +273,7 @@ func TestSetFileFormatError(t *testing.T) {
c := New(cfg) c := New(cfg)
c.SetFileFormat(Format(9999)) c.SetFileFormat(Format(9999))
if !c.HasError() { if !c.HasErrors() {
t.Error("Expected error") t.Error("Expected error")
} }
...@@ -302,7 +302,7 @@ func TestImport(t *testing.T) { ...@@ -302,7 +302,7 @@ func TestImport(t *testing.T) {
c.SetDefaultDirectories().ResetErrors() c.SetDefaultDirectories().ResetErrors()
c.Import() c.Import()
if c.HasError() { if c.HasErrors() {
t.Error("Expected not error", c.Errors()) t.Error("Expected not error", c.Errors())
} }
...@@ -413,7 +413,7 @@ func TestImport2(t *testing.T) { ...@@ -413,7 +413,7 @@ func TestImport2(t *testing.T) {
c.SetDefaultDirectories().ResetErrors() // errors not important here c.SetDefaultDirectories().ResetErrors() // errors not important here
c.Import() c.Import()
if c.HasError() { if c.HasErrors() {
t.Error("Expected not error", c.Errors()) t.Error("Expected not error", c.Errors())
} }
...@@ -461,7 +461,7 @@ func TestImport3(t *testing.T) { ...@@ -461,7 +461,7 @@ func TestImport3(t *testing.T) {
c.SetDefaultDirectories().ResetErrors() // errors not important here c.SetDefaultDirectories().ResetErrors() // errors not important here
c.Import() c.Import()
if c.HasError() { if c.HasErrors() {
t.Error("Expected not error", c.Errors()) t.Error("Expected not error", c.Errors())
} }
...@@ -514,7 +514,7 @@ func TestSetConfigName(t *testing.T) { ...@@ -514,7 +514,7 @@ func TestSetConfigName(t *testing.T) {
c := New(cfg) c := New(cfg)
c.SetFileName("test") c.SetFileName("test")
if c.HasError() { if c.HasErrors() {
t.Error("Expected not error") t.Error("Expected not error")
} }
...@@ -527,13 +527,13 @@ func TestConfigSetFileName(t *testing.T) { ...@@ -527,13 +527,13 @@ func TestConfigSetFileName(t *testing.T) {
c := New(cfg) c := New(cfg)
c.SetFileName("test") c.SetFileName("test")
if c.HasError() { if c.HasErrors() {
t.Error("Expected not error") t.Error("Expected not error")
} }
c.SetFileName("") c.SetFileName("")
if !c.HasError() { if !c.HasErrors() {
t.Error("Expected error") t.Error("Expected error")
} }
...@@ -546,7 +546,7 @@ func TestConfigSetFileFormat(t *testing.T) { ...@@ -546,7 +546,7 @@ func TestConfigSetFileFormat(t *testing.T) {
c := New(cfg) c := New(cfg)
c.SetFileFormat(99) c.SetFileFormat(99)
if !c.HasError() { if !c.HasErrors() {
t.Error("Expected not error") t.Error("Expected not error")
} }
...@@ -559,7 +559,7 @@ func TestConfigSetDirectories(t *testing.T) { ...@@ -559,7 +559,7 @@ func TestConfigSetDirectories(t *testing.T) {
c := New(cfg) c := New(cfg)
c.SetDirectories([]string{"a", "b"}) c.SetDirectories([]string{"a", "b"})
if !c.HasError() { if !c.HasErrors() {
t.Error("Expected not error") t.Error("Expected not error")
} }
...@@ -572,7 +572,7 @@ func TestConfigDirectories(t *testing.T) { ...@@ -572,7 +572,7 @@ func TestConfigDirectories(t *testing.T) {
c := New(cfg) c := New(cfg)
c.SetDirectories([]string{"a", "b"}) c.SetDirectories([]string{"a", "b"})
if !c.HasError() { if !c.HasErrors() {
t.Error("Expected not error") t.Error("Expected not error")
} }
...@@ -591,7 +591,7 @@ func TestConfigAddDirectory(t *testing.T) { ...@@ -591,7 +591,7 @@ func TestConfigAddDirectory(t *testing.T) {
c := New(cfg) c := New(cfg)
c.AddDirectory("a") c.AddDirectory("a")
if !c.HasError() { if !c.HasErrors() {
t.Error("Expected not error") t.Error("Expected not error")
} }
......
...@@ -47,7 +47,7 @@ func (s *setting[C]) serveGet(w http.ResponseWriter, r *http.Request) { ...@@ -47,7 +47,7 @@ func (s *setting[C]) serveGet(w http.ResponseWriter, r *http.Request) {
} }
if s.HasError() { if s.HasErrors() {
w.WriteHeader(http.StatusInternalServerError) w.WriteHeader(http.StatusInternalServerError)
return return
} }
......
...@@ -37,7 +37,7 @@ func FuzzTest(f *testing.F) { ...@@ -37,7 +37,7 @@ func FuzzTest(f *testing.F) {
} }
s.Write(os.Stdout, Yaml) s.Write(os.Stdout, Yaml)
if s.HasError() { if s.HasErrors() {
t.Error(s.Errors()) t.Error(s.Errors())
s.ResetErrors() s.ResetErrors()
} }
......
{"version":"1.0.1"} {"version":"1.1.0"}
...@@ -83,7 +83,7 @@ func TestAddReader(t *testing.T) { ...@@ -83,7 +83,7 @@ func TestAddReader(t *testing.T) {
// //
// s.Import() // s.Import()
// //
// if s.HasError() { // if s.HasErrors() {
// t.Error("Expected no errors but got ", s.Errors()) // t.Error("Expected no errors but got ", s.Errors())
// } // }
// //
......
...@@ -82,7 +82,7 @@ func TestSettingStopWatching(t *testing.T) { ...@@ -82,7 +82,7 @@ func TestSettingStopWatching(t *testing.T) {
c.Watch() c.Watch()
c.StopWatching() c.StopWatching()
if c.HasError() { if c.HasErrors() {
t.Error(c.Errors()) t.Error(c.Errors())
} }
...@@ -99,7 +99,7 @@ func TestSettingStopWatchingNotOnWatch(t *testing.T) { ...@@ -99,7 +99,7 @@ func TestSettingStopWatchingNotOnWatch(t *testing.T) {
c := New(config) c := New(config)
c.StopWatching() c.StopWatching()
if !c.HasError() { if !c.HasErrors() {
t.Error("Expected to have an error") t.Error("Expected to have an error")
} }
......