Commit Graph
56 Commits
Author SHA1 Message Date
Umputun 7497561d9c set anonymose with admin names to blocked #605 2020-03-08 15:37:31 -05:00
Dmitry VerkhoturovandUmputun d0ddd8aa80 Unify SMTP settings in separate section (#536)
* move SMTP settings to separate group

* move deprecated options in separate section in readme

* adjust variables in docker-compose

* add description to SmtpGroup

* remove SMTP option setting which is already set to same value

* remove smtp port default for consistency

* add server deprecated functions handling

* satisfy linter

* add missing bracket in description

* add test for handleDeprecatedFlags

* add HandleDeprecatedFlags function to CommonOptionsCommander

* improve HandleDeprecatedFlags behavior

* add missing result check to ServerCommand.HandleDeprecatedFlags
2020-01-14 14:49:39 -06:00
Dmitry VerkhoturovandUmputun 4cae7f0324 make TestServerApp_MainSignal more robust 2020-01-02 14:35:50 -06:00
Dmitry VerkhoturovandUmputun 6f9c87850a Adjust tests timouts to work on machine with HDD (#516)
* increase timeout for TestServerAuthHooks http client

* replace assert.Equal checks for slice length with require.Equal

* unify channel name across tests

* fix panic in Test_Main

* increase TestRest_CreateWithPictures timeout for HDD slowness

* increase TestService_VoteSameIPWithDuration timeout for HDD slowness

* increase go test timeout for HDD run

* increase TestRest_CreateWithPictures timeout for HDD slowness
2020-01-01 14:46:39 -06:00
Dmitry VerkhoturovandUmputun dbd83a1f0d Fix flapping TestRest_ tests (#513)
* replace single-member wait groups with channels

* increase TestRest_LastCommentsStreamSince comment write delay

* increase timeout for TestRest_InfoStreamCancel

* increase TestServerApp timeout

* adjust waiting time in TestRest_LastCommentsStreamSince in attempt to fix false positive

* adjust comments waiting location in multiple TestRest_ tests
2019-12-30 14:31:49 -06:00
Dmitry VerkhoturovandUmputun f416c6c5eb Fixes for multiple tests (#511)
* improve TestServer* reliability

* improve TestService_UserReplies reliability

* increase timeout for Test_Main

* improve TestRest_CreateWithPictures readability and reliability

* introduce random port to REST over SSL tests

* tinker TestRest_InfoStreamSince to have more slack before failure

* finalize test errors check unification

* simplify prepServerApp in cmd package tests

* improve TestRest_InfoStreamCancel reliability
2019-12-30 12:09:05 -06:00
Dmitry VerkhoturovandUmputun 62cc504600 Improve Test_Main reliability (#509)
* adjust TestServerApp_WithSSL to use sslPort in all test checks

* make Test_Main reliable and remove 5s sleep

* make test finishing reliable using "done" channel for TestServerApp*
2019-12-30 03:44:10 -06:00
Dmitry VerkhoturovandUmputun fddb737657 Improve TestServer* tests reliability (#508)
* explicitly ignore error from test connection close

* add client with timeout to places which used default http client

* move random port creation and waiting for server in separate function for reuse

* improve TestServer tests robustness

* move all server waiting code in tests to separate functions

* change chooseRandomUnusedPort to try to listen to port before return

* fix waitForHTTPSServerStart
2019-12-29 20:46:22 -06:00
Dmitry VerkhoturovandUmputun 7bab10ab57 Replace "(Not)Nil" test checks for errors with with "(No)Error" (#503)
* replace "(Not)Nil" test checks for errors with with "(No)Error"

* unify error text checks style

* clarify error check in tests in memory_store
2019-12-29 15:42:39 -06:00
Dmitry VerkhoturovandUmputun d23d119d70 Add API methods for setting and deleting email (#483)
* add API methods for setting and deleting email

* fix service.SetStringUserDetail signature to return string

* switch table test with description to t.Run()

* remove debug logging

* clarify error handling, functions names

* add email integration test

* add information about email subscription to readme

* change email API calls method from PUT to POST

* typo fix, remove unneeded capturing of range variable

* email test draft

* fix notify mock, email notification test draft

* add MockDestination to startupT return

* fix tests

* add email retrieval for notifications sending

* fix mock for notify

* rearrange mock notify declaration

* add GET /email API handler, fix typos

* revert startupT signature change

* get rid of startupTWithDest workaround

* add rest examples for rest notification

* improve email messages formatting

* fix email send repeater location

* remove unneeded context from sendMessage

* change signatures of buildMessage functions to have same field name

* add missing authenticate call on TLS connection

* add dev user auth token to email requests

* change email verification template

* email code and tests cleanup

* replace fixed spaces with normal ones

* human-readable variables names for new comment reply notification

* rename Comment to CommentText

* add html for comment email notification

* fix comment notification html style

* fix email test

* fix notify email messages rendering

* fix comments on rest examples for email

* explicitly state email notify email template fields

* clarify email API documentation

* change email test not to check quoted-printable part of message

* Fix link color, add unsubscribe link

* fix rest examples tokens

* add UnsubscribeLink support to Email

* add unsubscribe email handler

* fix new reply notification email style
2019-12-16 16:39:55 -06:00
Umputun cdcf5171cf lint: new warnings from 1.21 golang-lint 2019-10-31 22:09:28 -05:00
UmputunandGitHub 776b9117fc CI changes (#457)
* make tests more resilient

* adjust drone for v1.x and dev-box, remove travis support

* add backend build step on branch for drone

* fix from email

* change notif email

* less demanding test wait

* add settings section to drone plugins

* adjust branch build

* convert all drone ci docker confs

* rename drone targets
2019-10-31 20:20:18 -05:00
Umputun 653238bc99 increase test timeouts 2019-10-29 02:43:11 -05:00
Umputun cdc1ae1e85 fix dev mode test 2019-09-01 13:29:34 -05:00
Umputun 9c62453869 fix anon test failed due to email added 2019-09-01 13:24:31 -05:00
Umputun 1300464d2d Merge branch 'master' of github.com:umputun/remark 2019-08-27 03:33:43 -05:00
Umputun 22e5c25668 add custom email auth template 2019-08-27 03:33:34 -05:00
Umputun 074edc25ed fix unstable auth hook test 2019-08-27 03:12:11 -05:00
UmputunandGitHub 3c321f8992 Verified site id (#425)
* WIP: start with aud verification

* adjust rest test for token's site_id remark42

* add tests for non-matching aud

* fix auth hook test with updates limiter

* check siteID with enabled call for static store

* fix site enabled check
2019-08-25 22:00:19 -05:00
Umputun 1c6c9d6dcf increase timeouts in unstable tests 2019-08-05 01:28:14 -05:00
Umputun 9585bdff34 lint: multiple warnings, mostly in tests 2019-07-13 13:40:41 -05:00
Umputun c09eaa6e00 rename remote to rpc 2019-06-27 14:29:46 -05:00
Umputun 63a555126e add test for app with remote plugins 2019-06-25 20:06:30 -05:00
Umputun 48fcb0a5d9 add remote selection to store and admin 2019-06-25 20:06:30 -05:00
Umputun b30492556f add remote implementation of admin store 2019-06-25 20:06:30 -05:00
UmputunandGitHub 4adbca22b2 Refactor rest (#320)
* fresh vendor

* enforce vendor flag with env

* move tree to service package

* move controllers routing to rest.go, remove separate subrouters

* cleanup/formatting

* missing vendor packages

* move rss, img proxy, robots and getstarted to top-level routes

* simplify logger middleware usage

* randomize server test ports

* check for non-admin in admin tests

* lint: minor warns

* admin test to jwt admin
2019-05-07 01:54:19 -05:00
UmputunandGitHub 68b892f5e9 Image resize (#311)
* resize uploaded images #309

* fix temp files created in current dire after image test

* update mod

* missing image test files

* fix failed goroutine test on image-resize submit

* switch to mockery

* missing in mock change

* resize by both ResizeWidth and ResizeHeight

* add IMAGE_RESIZE params to readme

* add latest features to the description

* lint: missing file close in image test
2019-04-17 02:53:35 -05:00
Umputun 3d61be8c44 make AuthHooks test faster 2019-04-12 10:14:17 -05:00
Umputun 0aba6a5653 longer test time for server app 2019-03-11 14:23:12 -05:00
Umputun 0c950ae4f7 add anon option and direct provider #279 2019-02-19 13:59:43 -06:00
Umputun 3471c5dab8 add missing params to readme 2019-01-27 16:21:05 -06:00
Umputun 367c3d0cc2 blocked users returns 401 2019-01-15 13:17:59 -06:00
Umputun 781d90e98b switch to lgr 2019-01-07 22:32:50 -06:00
Umputun 0fd8657992 make title extractor optional 2019-01-05 13:22:28 -06:00
Umputun a6d20b1563 lint: missing error check in tests 2019-01-02 11:50:36 -06:00
Umputun ca1943f909 revendor with auth:0.1.1 2018-12-31 17:47:25 -06:00
Umputun 55cae69d49 add test triggeting auth hooks 2018-12-30 16:17:00 -06:00
Umputun 195e65ca60 adjusted tests for new auth lib 2018-12-30 13:31:03 -06:00
Umputun c4b10a395a most test passes with ext auth 2018-12-27 23:11:20 -06:00
UmputunandGitHub 2ecc08fb3e Ext cache (#236)
* remove  cache, switch to go-pkgz/rest/cache

* remove mongo cache from server test

* remove old caching code

* test tricky disqus inputs

* fix migrator test

* stacktrace dump test
2018-12-19 21:57:33 -06:00
Umputun 3a98d8593c fix mkdir tests #233 2018-12-18 09:09:25 -06:00
Anton KosourovandUmputun 8f678ad04e Feature/add autocert support (#217)
* add le support

* fix log info

* change readme for autocert mode

* rename acme location param

* add test for http challenge

* add acme-email param

* do tls config more sane
2018-11-25 13:12:07 -06:00
Umputun a66886a731 add telegram init test with wrong port and fake token 2018-11-04 12:48:19 -06:00
Umputun 08ea544bdc missing wait for app completion in SSL server test 2018-11-04 12:35:16 -06:00
Umputun e96a782708 move SSL tests to cmd/server 2018-11-04 12:18:09 -06:00
Umputun 0f3243e19b close notifier in shutdown sequence 2018-11-04 11:51:08 -06:00
UmputunandGitHub c70e060d22 Feature/avatar_bolt (#205)
* add bolt implementation of avatar store

* include bolt avatar store in main's test

* change docs with new avatart params

* lint: single line declaration

* separate bucket for avatars metas

* fix comments

* test for bolt params

* closable avatar store

* fix dbl-close
2018-09-14 20:33:40 -05:00
Umputun dc59fc9f7b adjust test for key store 2018-09-12 00:34:36 -05:00
Umputun 6458f622d2 refactor to combine admin and key store 2018-09-11 11:58:50 -05:00
Umputun a856fd9c7d pass revision as common opts instead of package global 2018-09-10 10:44:22 -05:00