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.
| ... | ... |
@@ -74,12 +74,12 @@ func httpError(w http.ResponseWriter, err error) {
|
| 74 | 74 |
statusCode = http.StatusUnauthorized |
| 75 | 75 |
} else if strings.Contains(err.Error(), "hasn't been activated") {
|
| 76 | 76 |
statusCode = http.StatusForbidden |
| 77 |
- } |
|
| 78 |
- |
|
| 77 |
+ } |
|
| 78 |
+ |
|
| 79 | 79 |
if err != nil {
|
| 80 | 80 |
utils.Errorf("HTTP Error: statusCode=%d %s", statusCode, err.Error())
|
| 81 |
- http.Error(w, err.Error(), statusCode) |
|
| 82 |
- } |
|
| 81 |
+ http.Error(w, err.Error(), statusCode) |
|
| 82 |
+ } |
|
| 83 | 83 |
} |
| 84 | 84 |
|
| 85 | 85 |
func writeJSON(w http.ResponseWriter, code int, v interface{}) error {
|
| ... | ... |
@@ -653,12 +653,8 @@ func postContainersStart(srv *Server, version float64, w http.ResponseWriter, r |
| 653 | 653 |
if vars == nil {
|
| 654 | 654 |
return fmt.Errorf("Missing parameter")
|
| 655 | 655 |
} |
| 656 |
- var err error |
|
| 657 | 656 |
name := vars["name"] |
| 658 | 657 |
name = decodeName(name) |
| 659 |
- if err != nil {
|
|
| 660 |
- return err |
|
| 661 |
- } |
|
| 662 | 658 |
if err := srv.ContainerStart(name, hostConfig); err != nil {
|
| 663 | 659 |
return err |
| 664 | 660 |
} |
| ... | ... |
@@ -410,7 +410,7 @@ func TestOutput(t *testing.T) {
|
| 410 | 410 |
func TestContainerNetwork(t *testing.T) {
|
| 411 | 411 |
runtime := mkRuntime(t) |
| 412 | 412 |
defer nuke(runtime) |
| 413 |
- container, err := runtime.Create( |
|
| 413 |
+ container, _, err := runtime.Create( |
|
| 414 | 414 |
&Config{
|
| 415 | 415 |
Image: GetTestImage(runtime).ID, |
| 416 | 416 |
Cmd: []string{"ping", "-c", "1", "127.0.0.1"},
|
| ... | ... |
@@ -426,23 +426,6 @@ func TestContainerNetwork(t *testing.T) {
|
| 426 | 426 |
if container.State.ExitCode != 0 {
|
| 427 | 427 |
t.Errorf("Unexpected ping 127.0.0.1 exit code %d (expected 0)", container.State.ExitCode)
|
| 428 | 428 |
} |
| 429 |
- |
|
| 430 |
- container, err = runtime.Create( |
|
| 431 |
- &Config{
|
|
| 432 |
- Image: GetTestImage(runtime).ID, |
|
| 433 |
- Cmd: []string{"ping", "-c", "1", "8.8.8.8"},
|
|
| 434 |
- }, |
|
| 435 |
- ) |
|
| 436 |
- if err != nil {
|
|
| 437 |
- t.Fatal(err) |
|
| 438 |
- } |
|
| 439 |
- defer runtime.Destroy(container) |
|
| 440 |
- if err := container.Run(); err != nil {
|
|
| 441 |
- t.Fatal(err) |
|
| 442 |
- } |
|
| 443 |
- if container.State.ExitCode != 0 {
|
|
| 444 |
- t.Errorf("Unexpected ping 8.8.8.8 exit code %d (expected 0)", container.State.ExitCode)
|
|
| 445 |
- } |
|
| 446 | 429 |
} |
| 447 | 430 |
|
| 448 | 431 |
func TestKillDifferentUser(t *testing.T) {
|