Documentation ¶
Overview ¶
Package smb supports the setup and utility functions relating to tests that require a Samba share.
Index ¶
Constants ¶
const (
GuestShareName = "guestshare"
)Variables ¶
This section is empty.
Functions ¶
func AddFileShareAction ¶
func AddFileShareAction(ui *uiauto.Context, kb *input.KeyboardEventWriter, rememberPassword bool, shareName, username, password string) uiauto.Action
AddFileShareAction returns a ui.Action that enters all the inputs required for an SMB file share in the corresponding dialog. This assumes the SMB file share dialog is already open.
func UnmountAllSmbMounts ¶
UnmountAllSmbMounts uses the chrome.fileManagerPrivate.removeMount API to unmount all the identified SMB FUSE filesystems. Chrome maintains a mapping of SMB shares so if we unmount via cros-disks it still thinks the volume is mounted with chained tests all failing after the first.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents the enter smb.conf file with a [global] section and 1 or more file shares.
func NewConfig ¶
func NewConfig() *Config
NewConfig creates a Config which represents a smb.conf file.
func (*Config) AddFileShare ¶
AddFileShare adds a share as a section to the Config object.
func (*Config) SetGlobalParam ¶
SetGlobalParam sets a key value pair for the [global] section.
func (*Config) String ¶
String returns a string representation of the samba config file as per: https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html
type FixtureData ¶
FixtureData is the struct exposed to tests.
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
Section represents either the [global] section or a file share. Each section is made up of parameters of the format:
key = value
func CreateBasicShare ¶
CreateBasicShare creates a file share Section with common parameters shared by all file shares.
func NewFileShare ¶
NewFileShare creates a subsection that starts with [name] and has key value pairs representing information about a file share.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the instance of the smb daemon.