MCPcopy Create free account
hub / github.com/digitalocean/go-libvirt / TestDomainCreateWithFlags

Function TestDomainCreateWithFlags

libvirt_test.go:689–707  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

687}
688
689func TestDomainCreateWithFlags(t *testing.T) {
690 dialer := libvirttest.New()
691 l := NewWithDialer(dialer)
692
693 err := l.Connect()
694 if err != nil {
695 t.Fatalf("connect failed: %v", err)
696 }
697 defer l.Disconnect()
698
699 d, err := l.lookup("test")
700 if err != nil {
701 t.Fatalf("failed to lookup domain: %v", err)
702 }
703 var flags uint32
704 if _, err := l.DomainCreateWithFlags(d, flags); err != nil {
705 t.Fatalf("unexpected create error: %v", err)
706 }
707}
708
709func TestShutdown(t *testing.T) {
710 dialer := libvirttest.New()

Callers

nothing calls this directly

Calls 6

NewFunction · 0.92
NewWithDialerFunction · 0.85
lookupMethod · 0.80
DomainCreateWithFlagsMethod · 0.80
ConnectMethod · 0.45
DisconnectMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…