mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-30 22:08:52 +08:00
Refactor actions.Client with options to help extensibility (#2193)
This commit is contained in:
@@ -6,20 +6,15 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/actions/actions-runner-controller/logging"
|
||||
"github.com/go-logr/logr"
|
||||
)
|
||||
|
||||
func TestAddClient(t *testing.T) {
|
||||
logger, err := logging.NewLogger(logging.LogLevelDebug, logging.LogFormatText)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error: creating logger: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
logger := logr.Discard()
|
||||
multiClient := NewMultiClient("test-user-agent", logger).(*multiClient)
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
Reference in New Issue
Block a user