Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests fail #9541

Closed
rasa opened this issue May 17, 2024 · 2 comments
Closed

Integration tests fail #9541

rasa opened this issue May 17, 2024 · 2 comments
Assignees
Labels
bug A problem with current functionality, as opposed to missing functionality (enhancement) needs-triage New issues needed to be validated

Comments

@rasa
Copy link
Member

rasa commented May 17, 2024

What happened?

go run build.go integration fails. See log below.
This patch fixes the issue:

--- a/lib/config/wrapper.go
+++ b/lib/config/wrapper.go
@@ -121,6 +121,8 @@ type Wrapper interface {
  Subscribe(c Committer) Configuration
  Unsubscribe(c Committer)
 
+ SetFolder(folder FolderConfiguration)
+
  suture.Service
 }
 
@@ -501,6 +503,12 @@ func (w *wrapper) Folder(id string) (FolderConfiguration, bool) {
  return fcfg.Copy(), ok
 }
 
+func (w *wrapper) SetFolder(folder FolderConfiguration) {
+ w.mut.Lock()
+ defer w.mut.Unlock()
+ w.cfg.SetFolders([]FolderConfiguration{folder})
+}
+
 // Save writes the configuration to disk, and generates a ConfigSaved event.
 func (w *wrapper) Save() error {
  w.mut.Lock()

Would a PR with this patch be acceptable?

Syncthing version

main

Platform & operating system

Linux amd64

Browser version

n/a

Relevant log output

ross@starlin ~/gh/syncthing $ go run build.go integration
[test -v -timeout 60m -tags purego,integration ./test]
# github.com/syncthing/syncthing/test [github.com/syncthing/syncthing/test.test]
test/filetype_test.go:29:6: cfg.SetFolder undefined (type config.Wrapper has no field or method SetFolder)
test/filetype_test.go:46:6: cfg.SetFolder undefined (type config.Wrapper has no field or method SetFolder)
test/filetype_test.go:62:6: cfg.SetFolder undefined (type config.Wrapper has no field or method SetFolder)
test/override_test.go:32:6: cfg.SetFolder undefined (type config.Wrapper has no field or method SetFolder)
test/symlink_test.go:33:6: cfg.SetFolder undefined (type config.Wrapper has no field or method SetFolder)
test/symlink_test.go:54:6: cfg.SetFolder undefined (type config.Wrapper has no field or method SetFolder)
test/symlink_test.go:74:6: cfg.SetFolder undefined (type config.Wrapper has no field or method SetFolder)
FAIL    github.com/syncthing/syncthing/test [build failed]
FAIL
exit status 1
exit status 1
@rasa rasa added bug A problem with current functionality, as opposed to missing functionality (enhancement) needs-triage New issues needed to be validated labels May 17, 2024
@rasa rasa self-assigned this May 17, 2024
@rasa
Copy link
Member Author

rasa commented May 17, 2024

Also, after this fix, I had to regen the mocks, for some tests to run.

@rasa
Copy link
Member Author

rasa commented May 18, 2024

Dup of #8071

@rasa rasa closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A problem with current functionality, as opposed to missing functionality (enhancement) needs-triage New issues needed to be validated
Projects
None yet
Development

No branches or pull requests

1 participant