1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Updated fixes post rebase from master

Removed test cases that are no longer
applicable with links and the port changes.
Remove test case where a test was hitting an
external ip.
This commit is contained in:
Michael Crosby 2013-10-16 17:08:14 -07:00 committed by Victor Vieux
parent db99966724
commit 0e24db3a68
3 changed files with 5 additions and 27 deletions

4
api.go
View file

@ -653,12 +653,8 @@ func postContainersStart(srv *Server, version float64, w http.ResponseWriter, r
if vars == nil { if vars == nil {
return fmt.Errorf("Missing parameter") return fmt.Errorf("Missing parameter")
} }
var err error
name := vars["name"] name := vars["name"]
name = decodeName(name) name = decodeName(name)
if err != nil {
return err
}
if err := srv.ContainerStart(name, hostConfig); err != nil { if err := srv.ContainerStart(name, hostConfig); err != nil {
return err return err
} }

View file

@ -410,7 +410,7 @@ func TestOutput(t *testing.T) {
func TestContainerNetwork(t *testing.T) { func TestContainerNetwork(t *testing.T) {
runtime := mkRuntime(t) runtime := mkRuntime(t)
defer nuke(runtime) defer nuke(runtime)
container, err := runtime.Create( container, _, err := runtime.Create(
&Config{ &Config{
Image: GetTestImage(runtime).ID, Image: GetTestImage(runtime).ID,
Cmd: []string{"ping", "-c", "1", "127.0.0.1"}, Cmd: []string{"ping", "-c", "1", "127.0.0.1"},
@ -426,23 +426,6 @@ func TestContainerNetwork(t *testing.T) {
if container.State.ExitCode != 0 { if container.State.ExitCode != 0 {
t.Errorf("Unexpected ping 127.0.0.1 exit code %d (expected 0)", container.State.ExitCode) t.Errorf("Unexpected ping 127.0.0.1 exit code %d (expected 0)", container.State.ExitCode)
} }
container, err = runtime.Create(
&Config{
Image: GetTestImage(runtime).ID,
Cmd: []string{"ping", "-c", "1", "8.8.8.8"},
},
)
if err != nil {
t.Fatal(err)
}
defer runtime.Destroy(container)
if err := container.Run(); err != nil {
t.Fatal(err)
}
if container.State.ExitCode != 0 {
t.Errorf("Unexpected ping 8.8.8.8 exit code %d (expected 0)", container.State.ExitCode)
}
} }
func TestKillDifferentUser(t *testing.T) { func TestKillDifferentUser(t *testing.T) {

View file

@ -324,7 +324,6 @@ func (runtime *Runtime) Create(config *Config) (*Container, []string, error) {
if err := MergeConfig(config, img.Config); err != nil { if err := MergeConfig(config, img.Config); err != nil {
return nil, nil, err return nil, nil, err
} }
} }
if len(config.Entrypoint) != 0 && config.Cmd == nil { if len(config.Entrypoint) != 0 && config.Cmd == nil {