Replaces windows carriage return for windows tests

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
Guillaume Tardif 2020-10-12 15:51:48 +02:00
parent a4f10c171e
commit 7b8255c953
1 changed files with 3 additions and 0 deletions

View File

@ -563,9 +563,12 @@ func TestUpSecrets(t *testing.T) {
endpoint := fmt.Sprintf("http://%s:%d", containerInspect.Ports[0].HostIP, containerInspect.Ports[0].HostPort)
output := HTTPGetWithRetry(t, endpoint+"/"+secret1Name, http.StatusOK, 2*time.Second, 20*time.Second)
// replace windows carriage return
output = strings.ReplaceAll(output, "\r", "")
assert.Equal(t, output, secret1Value)
output = HTTPGetWithRetry(t, endpoint+"/"+secret2Name, http.StatusOK, 2*time.Second, 20*time.Second)
output = strings.ReplaceAll(output, "\r", "")
assert.Equal(t, output, secret2Value)
t.Cleanup(func() {