backendtest

package
v0.0.0-...-677ed08 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2016 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

package backendtest contains common code for testing backends

Index

Constants

View Source
const HookYaml = `
name: foo
version: 1
developer: acme
hooks:
    configure:
plugs:
    plug:
        interface: iface
`
View Source
const PlugNoAppsYaml = `
name: foo
version: 1
developer: acme
plugs:
    plug:
        interface: iface
`
View Source
const SambaYamlV1 = `
name: samba
version: 1
developer: acme
apps:
    smbd:
slots:
    slot:
        interface: iface
`

Tests for Setup() and Remove()

View Source
const SambaYamlV1NoSlot = `
name: samba
version: 1
developer: acme
apps:
    smbd:
`
View Source
const SambaYamlV1WithNmbd = `
name: samba
version: 1
developer: acme
apps:
    smbd:
    nmbd:
slots:
    slot:
        interface: iface
`
View Source
const SambaYamlV1WithNmbdNoSlot = `
name: samba
version: 1
developer: acme
apps:
    smbd:
    nmbd:
`
View Source
const SambaYamlV2 = `
name: samba
version: 2
developer: acme
apps:
    smbd:
slots:
    slot:
        interface: iface
`
View Source
const SambaYamlWithHook = `` /* 167-byte string literal not displayed */
View Source
const SlotNoAppsYaml = `
name: foo
version: 1
developer: acme
slots:
    slots:
        interface: iface
`

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendSuite

type BackendSuite struct {
	Backend interfaces.SecurityBackend
	Repo    *interfaces.Repository
	Iface   *interfaces.TestInterface
	RootDir string
}

func (*BackendSuite) InstallSnap

func (s *BackendSuite) InstallSnap(c *C, devMode bool, snapYaml string, revision int) *snap.Info

InstallSnap "installs" a snap from YAML.

func (*BackendSuite) RemoveSnap

func (s *BackendSuite) RemoveSnap(c *C, snapInfo *snap.Info)

RemoveSnap "removes" an "installed" snap.

func (*BackendSuite) SetUpTest

func (s *BackendSuite) SetUpTest(c *C)

func (*BackendSuite) TearDownTest

func (s *BackendSuite) TearDownTest(c *C)

func (*BackendSuite) UpdateSnap

func (s *BackendSuite) UpdateSnap(c *C, oldSnapInfo *snap.Info, devMode bool, snapYaml string, revision int) *snap.Info

UpdateSnap "updates" an existing snap from YAML.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL