Feature 115/consolidate daemon to cli #116
No reviewers
Labels
No labels
bug
ci
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
performance
priority
P0
priority
P1
priority
P2
question
refactor
size
L
size
M
size
S
size
XL
size
XS
tests
trivial
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/paso!116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature-115/consolidate-daemon-to-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checklist
CONTRIBUTING.mdgo test ./... -race) locallygofmt -w .andgolangci-lint run ./...respectivelyREADME.mdif applicableSummary
Closes: #115
daemon management is now easily done with just the cli
no need for two binaries now.
good for setting up the package releases
@ -0,0 +1,82 @@package daemonThis test does not exercise
runDaemon(). It callsos.MkdirAlldirectly with a hardcoded0700, so it tests stdlib behaviour, not production code. If the permission value inrunDaemon()changed to e.g.0755, this test would still pass.The permission assertion (
assert.Equal(t, os.FileMode(0700), info.Mode().Perm())) is already present inTestRunDaemon_CreatesSocketAndShutdown(line 42), making this function both redundant and unable to catch regressions inrunDaemon().@ -0,0 +1,187 @@package daemonThe
exec.LookPath("systemctl")guard block is duplicated verbatim three times: here ininstallDaemonService, again inremoveDaemonService(line 137), and instopDaemoninstop.go. A shared helper (e.g.requireSystemctl() error) would eliminate the repetition and make future changes (e.g. a better error message) a single-site edit.@ -0,0 +1,187 @@package daemonAfter=network.targetis unnecessary for a daemon that communicates exclusively via a Unix domain socket. It adds an ordering dependency on the network stack, which can delay startup on machines where the network target is slow or absent (e.g. offline or air-gapped systems). Remove it or replace it withAfter=default.targetif an ordering anchor is needed.Informational Warning:
The snapshot tests have been changed.
Please add a screenshot showing what has been changed, and a description of why it was changed.
If you do not provide an explanation and screenshot in 3 days, this PR will be closed.
@TheNoeTrevino
Changed snapshot files (1 files)
internal/testing/snapshots/cli/testdata/e2e/task-show.goldensnapshot tests now have deterministic date setting. digits would vary before