@@ -295,7 +295,7 @@ func TestRunVolume(t *testing.T) {
295295 })
296296
297297 t .Run ("http get" , func (t * testing.T ) {
298- output := HTTPGetWithRetry (t , endpoint , http .StatusOK , 2 * time .Second , 20 * time .Second )
298+ output := HTTPGetWithRetry (t , endpoint , http .StatusOK , 2 * time .Second , time .Minute )
299299 assert .Assert (t , strings .Contains (output , testFileContent ), "Actual content: " + output )
300300 })
301301
@@ -584,12 +584,12 @@ func TestUpSecretsResources(t *testing.T) {
584584 assert .Assert (t , is .Len (web1Inspect .Ports , 1 ))
585585 endpoint := fmt .Sprintf ("http://%s:%d" , web1Inspect .Ports [0 ].HostIP , web1Inspect .Ports [0 ].HostPort )
586586
587- output := HTTPGetWithRetry (t , endpoint + "/" + secret1Name , http .StatusOK , 2 * time .Second , 20 * time .Second )
587+ output := HTTPGetWithRetry (t , endpoint + "/" + secret1Name , http .StatusOK , 2 * time .Second , time .Minute )
588588 // replace windows carriage return
589589 output = strings .ReplaceAll (output , "\r " , "" )
590590 assert .Equal (t , output , secret1Value )
591591
592- output = HTTPGetWithRetry (t , endpoint + "/" + secret2Name , http .StatusOK , 2 * time .Second , 20 * time .Second )
592+ output = HTTPGetWithRetry (t , endpoint + "/" + secret2Name , http .StatusOK , 2 * time .Second , time .Minute )
593593 output = strings .ReplaceAll (output , "\r " , "" )
594594 assert .Equal (t , output , secret2Value )
595595 })
@@ -598,11 +598,11 @@ func TestUpSecretsResources(t *testing.T) {
598598 assert .Assert (t , is .Len (web2Inspect .Ports , 1 ))
599599 endpoint := fmt .Sprintf ("http://%s:%d" , web2Inspect .Ports [0 ].HostIP , web2Inspect .Ports [0 ].HostPort )
600600
601- output := HTTPGetWithRetry (t , endpoint + "/" + secret2Name , http .StatusOK , 2 * time .Second , 20 * time .Second )
601+ output := HTTPGetWithRetry (t , endpoint + "/" + secret2Name , http .StatusOK , 2 * time .Second , time .Minute )
602602 output = strings .ReplaceAll (output , "\r " , "" )
603603 assert .Equal (t , output , secret2Value )
604604
605- HTTPGetWithRetry (t , endpoint + "/" + secret1Name , http .StatusNotFound , 2 * time .Second , 20 * time .Second )
605+ HTTPGetWithRetry (t , endpoint + "/" + secret1Name , http .StatusNotFound , 2 * time .Second , time .Minute )
606606 })
607607
608608 t .Run ("check resource limits" , func (t * testing.T ) {
@@ -627,7 +627,7 @@ func TestUpSecretsResources(t *testing.T) {
627627
628628 t .Run ("healthcheck restart failed app" , func (t * testing.T ) {
629629 endpoint := fmt .Sprintf ("http://%s:%d" , web1Inspect .Ports [0 ].HostIP , web1Inspect .Ports [0 ].HostPort )
630- HTTPGetWithRetry (t , endpoint + "/failtestserver" , http .StatusOK , 3 * time .Second , 3 * time .Second )
630+ HTTPGetWithRetry (t , endpoint + "/failtestserver" , http .StatusOK , 3 * time .Second , time .Minute )
631631
632632 logs := c .RunDockerCmd ("logs" , web1 ).Combined ()
633633 assert .Assert (t , strings .Contains (logs , "GET /healthz" ))
@@ -729,14 +729,14 @@ func TestUpUpdate(t *testing.T) {
729729 assert .Assert (t , is .Len (containerInspect .Ports , 1 ))
730730 endpoint := fmt .Sprintf ("http://%s:%d" , containerInspect .Ports [0 ].HostIP , containerInspect .Ports [0 ].HostPort )
731731
732- output := HTTPGetWithRetry (t , endpoint + "/words/noun" , http .StatusOK , 2 * time .Second , 20 * time .Second )
732+ output := HTTPGetWithRetry (t , endpoint + "/words/noun" , http .StatusOK , 2 * time .Second , time .Minute )
733733
734734 assert .Assert (t , strings .Contains (output , `"word":` ))
735735
736736 endpoint = fmt .Sprintf ("http://%s:%d" , fqdn , containerInspect .Ports [0 ].HostPort )
737- HTTPGetWithRetry (t , endpoint + "/words/noun" , http .StatusOK , 2 * time .Second , 20 * time .Second )
737+ HTTPGetWithRetry (t , endpoint + "/words/noun" , http .StatusOK , 2 * time .Second , time .Minute )
738738
739- body := HTTPGetWithRetry (t , endpoint + "/volume_test/" + testFileName , http .StatusOK , 2 * time .Second , 20 * time .Second )
739+ body := HTTPGetWithRetry (t , endpoint + "/volume_test/" + testFileName , http .StatusOK , 2 * time .Second , time .Minute )
740740 assert .Assert (t , strings .Contains (body , testFileContent ))
741741
742742 // Try to remove the volume while it's still in use
@@ -760,17 +760,22 @@ func TestUpUpdate(t *testing.T) {
760760 for _ , line := range l {
761761 fields := strings .Fields (line )
762762 name := fields [0 ]
763+
763764 switch name {
764765 case wordsContainer :
765766 wordsDisplayed = true
766- assert .Equal (t , fields [2 ], "Running" )
767+ assert .Check (t , len (fields ) >= 4 )
768+ assert .Equal (t , fields [3 ], "Running" , "Got -> %q. All fields -> %#v" , fields [3 ], fields )
767769 case dbContainer :
768770 dbDisplayed = true
769- assert .Equal (t , fields [2 ], "Running" )
771+ assert .Check (t , len (fields ) >= 4 )
772+ assert .Equal (t , fields [3 ], "Running" , "Got -> %q. All fields -> %#v" , fields [3 ], fields )
770773 case serverContainer :
771774 webDisplayed = true
772- assert .Equal (t , fields [2 ], "Running" )
773- assert .Check (t , strings .Contains (fields [3 ], ":80->80/tcp" ))
775+ assert .Check (t , len (fields ) >= 4 )
776+ assert .Equal (t , fields [3 ], "Running" , "Got -> %q. All fields -> %#v" , fields [3 ], fields )
777+ assert .Check (t , len (fields ) >= 5 )
778+ assert .Check (t , strings .Contains (fields [4 ], ":80->80/tcp" ), "Got -> %q. All fields -> %#v" , fields [4 ], fields )
774779 }
775780 }
776781 assert .Check (t , webDisplayed , "webDisplayed" + res .Stdout ())
0 commit comments