@@ -12,7 +12,7 @@ func (s *DockerSuite) TestCliFipAssociateUsedIP(c *check.C) {
1212 printTestCaseName ()
1313 defer printTestDuration (time .Now ())
1414
15- out , _ := dockerCmd (c , "fip" , "allocate" , "1" )
15+ out , _ := dockerCmd (c , "fip" , "allocate" , "-y" , " 1" )
1616 firstIP := strings .TrimSpace (out )
1717 fipList := []string {firstIP }
1818 defer releaseFip (c , fipList )
@@ -24,22 +24,22 @@ func (s *DockerSuite) TestCliFipAssociateUsedIP(c *check.C) {
2424 out , _ = runSleepingContainer (c , "-d" )
2525 secondContainerID := strings .TrimSpace (out )
2626
27- dockerCmd (c , "fip" , "associate " , firstIP , firstContainerID )
28- out , _ , err := dockerCmdWithError ("fip" , "associate " , firstIP , secondContainerID )
27+ dockerCmd (c , "fip" , "attach " , firstIP , firstContainerID )
28+ out , _ , err := dockerCmdWithError ("fip" , "attach " , firstIP , secondContainerID )
2929 c .Assert (err , checker .NotNil , check .Commentf ("Should fail." , out , err ))
30- out , _ = dockerCmd (c , "fip" , "disassociate " , firstContainerID )
30+ out , _ = dockerCmd (c , "fip" , "detach " , firstContainerID )
3131 c .Assert (out , checker .Equals , firstIP + "\n " )
3232}
3333
3434func (s * DockerSuite ) TestCliFipAssociateConfedContainer (c * check.C ) {
3535 printTestCaseName ()
3636 defer printTestDuration (time .Now ())
3737
38- out , _ := dockerCmd (c , "fip" , "allocate" , "1" )
38+ out , _ := dockerCmd (c , "fip" , "allocate" , "-y" , " 1" )
3939 firstIP := strings .TrimSpace (out )
4040 fipList := []string {firstIP }
4141
42- out , _ = dockerCmd (c , "fip" , "allocate" , "1" )
42+ out , _ = dockerCmd (c , "fip" , "allocate" , "-y" , " 1" )
4343 secondIP := strings .TrimSpace (out )
4444 fipList = append (fipList , secondIP )
4545 defer releaseFip (c , fipList )
@@ -48,30 +48,30 @@ func (s *DockerSuite) TestCliFipAssociateConfedContainer(c *check.C) {
4848 out , _ = runSleepingContainer (c , "-d" )
4949 firstContainerID := strings .TrimSpace (out )
5050
51- dockerCmd (c , "fip" , "associate " , firstIP , firstContainerID )
52- out , _ , err := dockerCmdWithError ("fip" , "associate " , secondIP , firstContainerID )
51+ dockerCmd (c , "fip" , "attach " , firstIP , firstContainerID )
52+ out , _ , err := dockerCmdWithError ("fip" , "attach " , secondIP , firstContainerID )
5353 c .Assert (err , checker .NotNil , check .Commentf ("Should fail." , out , err ))
54- out , _ = dockerCmd (c , "fip" , "disassociate " , firstContainerID )
54+ out , _ = dockerCmd (c , "fip" , "detach " , firstContainerID )
5555 c .Assert (out , checker .Equals , firstIP + "\n " )
5656}
5757
58- func (s * DockerSuite ) TestCliFipDisassociateUnconfedContainer (c * check.C ) {
58+ func (s * DockerSuite ) TestCliFipDisattachUnconfedContainer (c * check.C ) {
5959 printTestCaseName ()
6060 defer printTestDuration (time .Now ())
6161
6262 pullImageIfNotExist ("busybox" )
6363 out , _ := runSleepingContainer (c , "-d" )
6464 firstContainerID := strings .TrimSpace (out )
6565
66- out , _ , err := dockerCmdWithError ("fip" , "disassociate " , firstContainerID )
66+ out , _ , err := dockerCmdWithError ("fip" , "detach " , firstContainerID )
6767 c .Assert (err , checker .NotNil , check .Commentf ("Should fail." , out , err ))
6868}
6969
7070func (s * DockerSuite ) TestCliFipReleaseUsedIP (c * check.C ) {
7171 printTestCaseName ()
7272 defer printTestDuration (time .Now ())
7373
74- out , _ := dockerCmd (c , "fip" , "allocate" , "1" )
74+ out , _ := dockerCmd (c , "fip" , "allocate" , "-y" , " 1" )
7575 firstIP := strings .TrimSpace (out )
7676 fipList := []string {firstIP }
7777 defer releaseFip (c , fipList )
@@ -80,10 +80,10 @@ func (s *DockerSuite) TestCliFipReleaseUsedIP(c *check.C) {
8080 out , _ = runSleepingContainer (c , "-d" )
8181 firstContainerID := strings .TrimSpace (out )
8282
83- dockerCmd (c , "fip" , "associate " , firstIP , firstContainerID )
83+ dockerCmd (c , "fip" , "attach " , firstIP , firstContainerID )
8484 out , _ , err := dockerCmdWithError ("fip" , "release" , firstIP )
8585 c .Assert (err , checker .NotNil , check .Commentf ("Should fail." , out , err ))
86- out , _ = dockerCmd (c , "fip" , "disassociate " , firstContainerID )
86+ out , _ = dockerCmd (c , "fip" , "detach " , firstContainerID )
8787 c .Assert (out , checker .Equals , firstIP + "\n " )
8888}
8989
0 commit comments