func TestIPCAttachWelcome(t *testing.T) {
	var ipc string
	if runtime.GOOS == "windows" {
		ipc = `\\.\pipe\lachesis.ipc`
	} else {
		ws := tmpdir(t)
		defer os.RemoveAll(ws)
		ipc = filepath.Join(ws, "opera.ipc")
	}
	cli := exec(t,
		"--fakenet", "0/1", "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
		"--ipcpath", ipc)
	waitForEndpoint(t, ipc, 60*time.Second)
	testAttachWelcome(t, cli, "ipc:"+ipc, ipcAPIs)
	cli.Kill()
	cli.WaitExit()
}
Tests that a console can be attached to a running node via various means.
package launcher
import (
	"crypto/rand"
	"math/big"
	"os"
	"path/filepath"
	"runtime"
	"strconv"
	"strings"
	"testing"
	"time"
	"github.com/Fantom-foundation/go-opera/integration/makegenesis"
	"github.com/ethereum/go-ethereum/params"
)
const (
	ipcAPIs  = "abft:1.0 admin:1.0 dag:1.0 debug:1.0 ftm:1.0 net:1.0 personal:1.0 rpc:1.0 sfc:1.0 txpool:1.0 web3:1.0"
	httpAPIs = "abft:1.0 dag:1.0 ftm:1.0 rpc:1.0 sfc:1.0 web3:1.0"
)
func TestConsoleWelcome(t *testing.T) {
	cli := exec(t,
		"--fakenet", "0/1", "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
		"console")
	cli.SetTemplateFunc("goos", func() string { return runtime.GOOS })
	cli.SetTemplateFunc("goarch", func() string { return runtime.GOARCH })
	cli.SetTemplateFunc("gover", runtime.Version)
	cli.SetTemplateFunc("version", func() string { return params.VersionWithCommit("", "") })
	cli.SetTemplateFunc("niltime", genesisStart)
	cli.SetTemplateFunc("apis", func() string { return ipcAPIs })
	cli.Expect(`
Welcome to the Lachesis JavaScript console!
instance: go-opera/v{{version}}/{{goos}}-{{goarch}}/{{gover}}
coinbase: {{.Coinbase}}
at block: 1 ({{niltime}})
 datadir: {{.Datadir}}
 modules: {{apis}}
To exit, press ctrl-d
> {{.InputLine "exit"}}
`)
	cli.ExpectExit()
}