1
0
mirror of https://github.com/rancher/os.git synced 2025-09-23 19:40:15 +00:00

Godep updates

google.golang.org/cloud
github.com/fsouza/go-dockerclient
golang.org/x/net/context
This commit is contained in:
Darren Shepherd
2015-04-10 09:09:47 -07:00
parent 2a69c5f38e
commit 15bd54a841
16 changed files with 3811 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ Fabio Rehm <fgrehm@gmail.com>
Fatih Arslan <ftharsln@gmail.com>
Flavia Missi <flaviamissi@gmail.com>
Francisco Souza <f@souza.cc>
Guillermo Álvarez Fernández <guillermo@cientifico.net>
Jari Kolehmainen <jari.kolehmainen@digia.com>
Jason Wilder <jwilder@litl.com>
Jawher Moussa <jawher.moussa@gmail.com>
@@ -35,6 +36,7 @@ Johan Euphrosine <proppy@google.com>
Kamil Domanski <kamil@domanski.co>
Karan Misra <kidoman@gmail.com>
Kim, Hirokuni <hirokuni.kim@kvh.co.jp>
liron-l <levinlir@gmail.com>
Lucas Clemente <lucas@clemente.io>
Lucas Weiblen <lucasweiblen@gmail.com>
Mantas Matelis <mmatelis@coursera.org>
@@ -52,6 +54,7 @@ Rafe Colton <rafael.colton@gmail.com>
Rob Miller <rob@kalistra.com>
Robert Williamson <williamson.robert@gmail.com>
Salvador Gironès <salvadorgirones@gmail.com>
Sam Rijs <srijs@airpost.net>
Simon Eskildsen <sirup@sirupsen.com>
Simon Menke <simon.menke@gmail.com>
Skolos <skolos@gopherlab.com>

View File

@@ -198,7 +198,7 @@ type Config struct {
Labels map[string]string `json:"Labels,omitempty" yaml:"Labels,omitempty"`
}
// LogConfig log driver type and configuration
// LogConfig defines the log driver type and the configuration for it.
type LogConfig struct {
Type string `json:"Type,omitempty" yaml:"Type,omitempty"`
Config map[string]string `json:"Config,omitempty" yaml:"Config,omitempty"`
@@ -244,6 +244,8 @@ type Container struct {
VolumesRW map[string]bool `json:"VolumesRW,omitempty" yaml:"VolumesRW,omitempty"`
HostConfig *HostConfig `json:"HostConfig,omitempty" yaml:"HostConfig,omitempty"`
ExecIDs []string `json:"ExecIDs,omitempty" yaml:"ExecIDs,omitempty"`
AppArmorProfile string `json:"AppArmorProfile,omitempty" yaml:"AppArmorProfile,omitempty"`
}
// RenameContainerOptions specify parameters to the RenameContainer function.
@@ -413,6 +415,8 @@ type HostConfig struct {
RestartPolicy RestartPolicy `json:"RestartPolicy,omitempty" yaml:"RestartPolicy,omitempty"`
Devices []Device `json:"Devices,omitempty" yaml:"Devices,omitempty"`
LogConfig LogConfig `json:"LogConfig,omitempty" yaml:"LogConfig,omitempty"`
ReadonlyRootfs bool `json:"ReadonlyRootfs,omitempty" yaml:"ReadonlyRootfs,omitempty"`
SecurityOpt []string `json:"SecurityOpt,omitempty" yaml:"SecurityOpt,omitempty"`
}
// StartContainer starts a container, returning an error in case of failure.

View File

@@ -155,6 +155,7 @@ func TestListContainersFailure(t *testing.T) {
func TestInspectContainer(t *testing.T) {
jsonContainer := `{
"Id": "4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2",
"AppArmorProfile": "Profile",
"Created": "2013-05-07T14:51:42.087658+02:00",
"Path": "date",
"Args": [],
@@ -176,7 +177,10 @@ func TestInspectContainer(t *testing.T) {
],
"Image": "base",
"Volumes": {},
"VolumesFrom": ""
"VolumesFrom": "",
"SecurityOpt": [
"label:user:USER"
]
},
"State": {
"Running": false,

View File

@@ -252,7 +252,7 @@ type PullImageOptions struct {
RawJSONStream bool `qs:"-"`
}
// PullImage pulls an image from a remote registry, logging progress to w.
// PullImage pulls an image from a remote registry, logging progress to opts.OutputStream.
//
// See http://goo.gl/ACyYNS for more details.
func (c *Client) PullImage(opts PullImageOptions, auth AuthConfiguration) error {

View File

@@ -168,6 +168,11 @@ func (s *DockerServer) ResetFailure(id string) {
delete(s.failures, id)
}
// ResetMultiFailures removes all enqueued failures.
func (s *DockerServer) ResetMultiFailures() {
s.multiFailures = []map[string]string{}
}
// CustomHandler registers a custom handler for a specific path.
//
// For example:

View File

@@ -1165,6 +1165,21 @@ func TestRemoveFailure(t *testing.T) {
}
}
func TestResetMultiFailures(t *testing.T) {
server := DockerServer{multiFailures: []map[string]string{}}
server.buildMuxer()
errorID := "multi error"
server.PrepareMultiFailures(errorID, "containers/json")
server.PrepareMultiFailures(errorID, "containers/json")
if len(server.multiFailures) != 2 {
t.Errorf("PrepareMultiFailures: error adding multi failures.")
}
server.ResetMultiFailures()
if len(server.multiFailures) != 0 {
t.Errorf("ResetMultiFailures: error reseting multi failures.")
}
}
func TestMutateContainer(t *testing.T) {
server := DockerServer{failures: make(map[string]string)}
server.buildMuxer()