mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-25 13:59:08 +01:00
Print user too
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"os/user"
|
||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@@ -59,8 +60,13 @@ func waitForServiceStatus(expectedStatus service.Status, timeout time.Duration)
|
|||||||
|
|
||||||
// TestServiceLifecycle tests the complete service lifecycle
|
// TestServiceLifecycle tests the complete service lifecycle
|
||||||
func TestServiceLifecycle(t *testing.T) {
|
func TestServiceLifecycle(t *testing.T) {
|
||||||
fmt.Printf("--- Started TestServiceLifecycle test on %s\n", runtime.GOOS)
|
currentUser, err := user.Current()
|
||||||
t.Log("--- Running service lifecycle test")
|
if err != nil {
|
||||||
|
t.Fatalf("Failed to get current user: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Printf("--- Started TestServiceLifecycle test on %s %s\n", runtime.GOOS, currentUser.Username)
|
||||||
|
t.Log("--- Running service lifecycle test: %s, %s", runtime.GOOS, currentUser.Username)
|
||||||
|
|
||||||
// TODO: Add support for Windows and macOS
|
// TODO: Add support for Windows and macOS
|
||||||
if runtime.GOOS != "linux" && runtime.GOOS != "freebsd" {
|
if runtime.GOOS != "linux" && runtime.GOOS != "freebsd" {
|
||||||
|
|||||||
Reference in New Issue
Block a user