split the common package into config, logger, and sync
moved the unix socket things from merlin.go into its own package
made some adjustments (splitting methods, moving stuff) to make it easier to test
Note: at the moment the drone.io is failing because the of some time zone stuff
Todo
write unit tests for the sync package
test the program as a whole
#### Changes made
- wrote some tests
- split the common package into config, logger, and sync
- moved the unix socket things from merlin.go into its own package
- made some adjustments (splitting methods, moving stuff) to make it easier to test
Note: at the moment the drone.io is failing because the of some time zone stuff
#### Todo
- write unit tests for the sync package
- test the program as a whole
same here, some sync types already append the password file - and how the password file should be added to args depends on the type of sync, so probably would remove this too
same here, some sync types already append the password file - and how the password file should be added to args depends on the type of sync, so probably would remove this too
don't think you want to be appending rsync host and localDir here too. each sync type already appends it.
also different sync types have different ways of building the host (some needs to be the daemon style host and some needs to be a ssh host)
don't think you want to be appending rsync host and localDir here too. each sync type already appends it.
also different sync types have different ways of building the host (some needs to be the daemon style host and some needs to be a ssh host)
I'm thinking of keeping a modified version of part to make sure that startSync will immediately exit if merlin cannot mkdir the buildDownloadDir
Huh all this stuff was actually moved over from the startSync function
https://git.csclub.uwaterloo.ca/public/mirror/src/branch/go/merlin/common/sync.go#L256-L270
I'm thinking of keeping a modified version of part to make sure that startSync will immediately exit if merlin cannot mkdir the buildDownloadDir
Changes made
Note: at the moment the drone.io is failing because the of some time zone stuff
Todo
lgtm except the things in sync.go
return
}
if repo.PasswordFile != "" {
same here, some sync types already append the password file - and how the password file should be added to args depends on the type of sync, so probably would remove this too
I agree with this, I'll remove it shortly
args = append(args, "--password-file", filename)
}
args = append(args, buildRsyncHost(repo), localDir)
don't think you want to be appending rsync host and localDir here too. each sync type already appends it.
also different sync types have different ways of building the host (some needs to be the daemon style host and some needs to be a ssh host)
Huh all this stuff was actually moved over from the startSync function
https://git.csclub.uwaterloo.ca/public/mirror/src/branch/go/merlin/common/sync.go#L256-L270
I'm thinking of keeping a modified version of part to make sure that startSync will immediately exit if merlin cannot mkdir the buildDownloadDir
yeah my bad about the original sync.go i think i forgot to remove them
Lol merge request broke after pushing a commit to refactor.
"This pull request is broken due to missing fork information."
Reviewers