Skip to content

Commit ba0a3fd

Browse files
author
kaanyalti
committed
enhancement(6394): added comment explaining motive behind simple install functions
1 parent ebbd186 commit ba0a3fd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pkg/testing/fixture_install.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,21 @@ func getProcesses(t *gotesting.T, regex string) []runningProcess {
445445
return processes
446446
}
447447

448+
// SimpleInstall is a utility function that only installs the agent and sets up
449+
// the socketPath for the client. It only implements Deb and Rpm as these two
450+
// were the only ones needed at the time of implementation. If needed tar.gz can
451+
// be added as well. This function should be used where you need the agent
452+
// installed without setting up any cleanup, without enrolling the agent and
453+
// without calling systemd.
454+
//
455+
// A good use case is when there is already an agent (deb or rpm) installed, and
456+
// when you want to install another agent to upgrade.
457+
//
458+
// There are major overlaps between this function and the installDeb and
459+
// installRpm functions. At the time of implementation refactoring installDeb
460+
// and installRpm functions were considered; however, to avoid convoluting the
461+
// code, the relevant parts were duplicated and put into these "simple install"
462+
// functions.
448463
func (f *Fixture) SimpleInstall(ctx context.Context) ([]byte, error) {
449464
switch f.packageFormat {
450465
case "deb":

0 commit comments

Comments
 (0)