backendtest

package
v0.0.0-...-7cedb2b Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2016 License: GPL-3.0 Imports: 4 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:
    apply-config:
plugs:
    iface:
`
View Source
const SambaYamlV1 = `
name: samba
version: 1
developer: acme
apps:
    smbd:
slots:
    iface:
`

Tests for Setup() and Remove()

View Source
const SambaYamlV1WithNmbd = `
name: samba
version: 1
developer: acme
apps:
    smbd:
    nmbd:
slots:
    iface:
`
View Source
const SambaYamlV2 = `
name: samba
version: 2
developer: acme
apps:
    smbd:
slots:
    iface:
`
View Source
const SambaYamlWithHook = `
name: samba
apps:
    smbd:
    nmbd:
hooks:
    apply-config:
        plugs: [iface]
slots:
    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