//go:build integration package main import ( "context" "strings" "testing" ) func TestAPushNamingNoMachineIsRefusedUnlessItSaysAll(t *testing.T) { err := pushCommand(context.Background(), nil) if err == nil || !strings.Contains(err.Error(), "--all") { t.Fatalf("a bare push was not refused: %v", err) } if err := pushCommand(context.Background(), []string{"--all", "--behind"}); err == nil { t.Fatal("--all with --behind was accepted") } }