diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1c8576a2..f6043558 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -144,7 +144,7 @@ jobs: context: . builder: ${{ steps.builder.outputs.name }} file: ./${{ steps.info.outputs.dockerfile }} - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v7 + platforms: linux/amd64,linux/arm64,linux/ppc64le push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.info.outputs.tags }} build-args: | diff --git a/httpd/httpd_test.go b/httpd/httpd_test.go index 507b5f14..a10be9fb 100644 --- a/httpd/httpd_test.go +++ b/httpd/httpd_test.go @@ -3509,7 +3509,7 @@ func TestSkipNaturalKeysValidation(t *testing.T) { req.Header.Set("Content-Type", "application/x-www-form-urlencoded") rr = executeRequest(req) assert.Equal(t, http.StatusFound, rr.Code) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) form = make(url.Values) form.Set(csrfFormToken, csrfToken) form.Set("code", lastResetCode) @@ -3602,7 +3602,7 @@ func TestSkipNaturalKeysValidation(t *testing.T) { req.Header.Set("Content-Type", "application/x-www-form-urlencoded") rr = executeRequest(req) assert.Equal(t, http.StatusFound, rr.Code) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) form = make(url.Values) form.Set(csrfFormToken, csrfToken) form.Set("code", lastResetCode) @@ -8210,7 +8210,7 @@ func TestMaxSessions(t *testing.T) { req.Header.Set("Content-Type", "application/x-www-form-urlencoded") rr := executeRequest(req) assert.Equal(t, http.StatusFound, rr.Code) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) form = make(url.Values) form.Set(csrfFormToken, csrfToken) form.Set("password", defaultPassword) @@ -8285,7 +8285,7 @@ func TestSFTPLoopError(t *testing.T) { req.Header.Set("Content-Type", "application/x-www-form-urlencoded") rr := executeRequest(req) assert.Equal(t, http.StatusFound, rr.Code) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) form = make(url.Values) form.Set(csrfFormToken, csrfToken) form.Set("password", defaultPassword) @@ -14325,7 +14325,7 @@ func TestAdminForgotPassword(t *testing.T) { req.Header.Set("Content-Type", "application/x-www-form-urlencoded") rr = executeRequest(req) assert.Equal(t, http.StatusFound, rr.Code) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) form = make(url.Values) req, err = http.NewRequest(http.MethodPost, webAdminResetPwdPath, bytes.NewBuffer([]byte(form.Encode()))) @@ -14363,7 +14363,7 @@ func TestAdminForgotPassword(t *testing.T) { req.Header.Set("Content-Type", "application/x-www-form-urlencoded") rr = executeRequest(req) assert.Equal(t, http.StatusFound, rr.Code) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) // not working smtp server smtpCfg = smtp.Config{ @@ -14477,7 +14477,7 @@ func TestUserForgotPassword(t *testing.T) { req.Header.Set("Content-Type", "application/x-www-form-urlencoded") rr = executeRequest(req) assert.Equal(t, http.StatusFound, rr.Code) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) // no csrf token form = make(url.Values) req, err = http.NewRequest(http.MethodPost, webClientResetPwdPath, bytes.NewBuffer([]byte(form.Encode()))) @@ -14518,7 +14518,7 @@ func TestUserForgotPassword(t *testing.T) { req.Header.Set("Content-Type", "application/x-www-form-urlencoded") rr = executeRequest(req) assert.Equal(t, http.StatusFound, rr.Code) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) smtpCfg = smtp.Config{} err = smtpCfg.Initialize("..") @@ -14582,7 +14582,7 @@ func TestAPIForgotPassword(t *testing.T) { assert.NoError(t, err) rr = executeRequest(req) checkResponseCode(t, http.StatusOK, rr) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) // invalid JSON req, err = http.NewRequest(http.MethodPost, path.Join(adminPath, altAdminUsername, "/reset-password"), bytes.NewBuffer([]byte(`{`))) @@ -14639,7 +14639,7 @@ func TestAPIForgotPassword(t *testing.T) { assert.NoError(t, err) rr = executeRequest(req) checkResponseCode(t, http.StatusOK, rr) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) // invalid JSON req, err = http.NewRequest(http.MethodPost, path.Join(userPath, defaultUsername, "/reset-password"), bytes.NewBuffer([]byte(`{`))) @@ -14699,7 +14699,7 @@ func TestAPIForgotPassword(t *testing.T) { assert.NoError(t, err) rr = executeRequest(req) checkResponseCode(t, http.StatusOK, rr) - assert.Greater(t, len(lastResetCode), 20) + assert.GreaterOrEqual(t, len(lastResetCode), 20) smtpCfg = smtp.Config{} err = smtpCfg.Initialize("..")