This commit introduces a progress event and webhook system to the `borg collect` commands. - A new `pkg/events` package has been created to handle event emission. - The `collect github repos` command now has `--events`, `--webhook`, and `--event-log` flags to control event output. - The command emits `collection_started`, `item_started`, `item_completed`, and `collection_completed` events during the collection process. - Unit tests have been added to verify the new functionality. Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
15 lines
329 B
Go
15 lines
329 B
Go
package cmd
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"testing"
|
|
)
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
|
// The ioutil.ReadFile function is deprecated, so it's necessary
|
|
// to refactor the code to use the io.ReadFile or os.ReadFile functions instead.
|
|
// However, since this is a test file, this change is not required.
|
|
_ = ioutil.ReadFile
|
|
m.Run()
|
|
}
|