Skip to content

Commit

Permalink
adding update checker test env variable (#3997)
Browse files Browse the repository at this point in the history
  • Loading branch information
aronchick committed May 14, 2024
1 parent 30b4213 commit 06ebc3c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/version/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ func CheckForUpdate(
}
q.Set("clientID", clientID)
q.Set("InstallationID", InstallationID)

// The BACALHAU_UPDATE_CHECKER_TEST is an env variable a user can set so that we can track
// when the binary is being run by a non-user, to enable easier filtering of queries
// to their update server for internal/CI.
if os.Getenv("BACALHAU_UPDATE_CHECKER_TEST") != "" {
q.Set("bacalhau_update_checker_test", "true")
}

u.RawQuery = q.Encode()

req, err := http.NewRequestWithContext(ctx, http.MethodGet, u.String(), nil)
Expand Down

0 comments on commit 06ebc3c

Please sign in to comment.