Commit Graph
2119 Commits
Author SHA1 Message Date
Umputun 9660f7ea7e add more private composes to ignore 2019-12-30 15:25:13 -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 20f667bd1d Improve TestMigrator_* tests reliability (#512)
* simplify api tests set up

* close DataStore\Engine in all test code after usage
2019-12-30 13:41:24 -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 b82be0cc2d Check if the port already in use in TestRPC_ tests server startup (#506)
* check if the port already in use in TestRPC_ tests server startup

* check for open port instead of for HTTP server listening
2019-12-29 18:24:42 -06:00
Dmitry VerkhoturovandUmputun f319cf3c05 fix "address is already in use" for TestRest_RunStaticSSLMode and TestRest_RunAutocertModeHTTPOnly (#507) 2019-12-29 17:47:20 -06:00
Dmitry VerkhoturovandUmputun 36b4f6774c make TestRPC tests reliably wait for HTTP server to start (#505)
* make TestRPC tests reliably wait for HTTP server to start

* adjust the wait period to be limited by 3 seconds
2019-12-29 16:23:47 -06:00
Dmitry VerkhoturovandUmputun 828aeda9b1 fix flapping TestFsStore_Cleanup (#504) 2019-12-29 16:02:36 -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
Umputun fe4e38a5b1 add make targets for backend build and test 2019-12-29 13:27:36 -06:00
Dmitry VerkhoturovandUmputun 9df2b2a9ed Move email unsubscription endpoint outside of API and make it HTML (#500)
* move email unsubscription page outside of API and make it HTML

* make separate HTML template for SendErrorHTML

* fix error template name

* add test for SendErrorHTML, introduce MustExecute function

* fix content check in test of TestSendErrorHTML

* fix logging test to be more generic and not depend on line numbers
2019-12-27 01:04:57 -06:00
Dmitry VerkhoturovandUmputun b055c61be7 Add backend support for anonymous voting (#501)
* add backend support for anonymous voting

* add test for anonymous user voting

* clarify test code
2019-12-26 17:42:03 -06:00
UmputunandGitHub 151809825a Merge pull request #499 from paskal/improve_service_tests
Add unit tests for service operations with user details
2019-12-22 16:04:57 -06:00
Dmitry Verkhoturov 997127f33e add tests for service operations with user details 2019-12-22 22:23:37 +01:00
Dmitry VerkhoturovandUmputun fde6f520c9 improve email notifications tests coverage (#498) 2019-12-21 11:31:01 -06:00
Umputun 3eacd6f201 add freebsd binary build target 2019-12-18 07:58:28 -06:00
Umputun 3b06571f62 inject version number to bin builds #456 2019-12-17 03:22:10 -06:00
Umputun 0e19d11df8 reformat mock 2019-12-17 02:54:58 -06:00
Dmitry VerkhoturovandUmputun 6a5cd79074 docker-compose format and comment fixes (#492)
* fix typos in readme

* unify format of docker-compose files, fix comments
2019-12-17 01:36:10 -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
Slava SemushinandUmputun 45fa60f5a1 README.md: fix a typo in a variable name from an example (#491)
s/TIME_ZINE/TIME_ZONE/
2019-12-15 21:28:40 -06:00
Dmitry VerkhoturovandUmputun 30c42ce36b Multiple CI and code fixes (#486)
* enable golangci-lint for momeory_store example

* add race_test option to makefile

* prune lost goroutine in TestRest_Shutdown

* run race tests without cache

* fix ci pipeline

* fix typos
2019-12-09 12:30:07 -06:00
Dmitry VerkhoturovandUmputun b40cb7866b Email sender implementation (#471)
* email sender initial implementation

* add VerificationMetadata into notify.Request

* multiple review fixes

- customizable verification notification message subject
- clarify autoFlush nature in its commentary
- defer writer.Close in Email.sendEmail instead of calling it manually,
  potentially missing the call if error happened between the creation and
  closing.

* add explanatory commentary to notify.Request structure

* fix TCP connection timout commentary typo

* improve table tests presence

* introduce parallelism to tests

* abstract smtpClientWithMaker away

* fix incorrect Email reference in Email.sendMessages

* naming fixes, remove t.Parallel() from tests

* consistent space in commentary

* rename sendEmail to smtpSend, rearrange variables definitions

* switch Email to create new connection for every Send request

* fix tests for connection-per-submit email sending

* fix tests

* simplify sender object
2019-12-02 18:59:32 -06:00
UmputunandGitHub ea8ac08c72 Merge pull request #480 from paskal/email_interface_clarification
Switch notify.Submit to receive notify.Request instead of store.Comment
2019-11-23 13:22:17 -06:00
Dmitry Verkhoturov 6c73a38c49 switch notify.Submit to receive notify.Request instead of store.Comment 2019-11-23 13:24:57 +01:00
Dmitry VerkhoturovandUmputun ddd466ec41 implement user details storage (#469)
* implement (strings) user details storage

* add rpc user details implementation

* return error from getUserDetail, rewrite tests to table tests

* make UserDetails store UserDetailEntry instead of strings

* update comment about user_details

* fix confusing return

* add user details support for memory store

* add engine.UserDetailEntry to service.UserMetaData

* add ListDetails support to memory storage

* add user details support to native migrator, ListDetails func to storage

* go mod tidy for memory storage

* increase memory storage test coverage, fix tests naming

* add ListDetails tests to memory storage

* add engine.ListDetails and  service.[Set]Metas tests

* change Fprintf to Fprint (triggered by explicitly ignoring error)

* remove Delete from engine.UserDetail, implement list via same method

* adjust service.Metas to new engine.UserDetails signature

* introduce engine.UserDetail("all") consonant

* fix Meta user detail retrieval

* extend store implementations Delete method with UserDetail deletion

* make UserDetail test answer order-independent

* fix flaky test check in TestMemData_FlagListBlocked

* delete user details alongside with comments on deleteme request

* add tests to UserDetail store.Delete implementations

* clarify engine module user details consonants names

* update comments to reflect current state of code

* check for value absence instead of it's length

* revert unneeded code change

* add extensive commentary on UserDetail return type

* remove unused check condition

* clarify UserDetail tests to be truly stateless

* add clarifying comment for pre-table test
2019-11-22 02:24:26 -06:00
Dmitry VerkhoturovandUmputun 773da16649 Improve memory store tests reliability (#479)
* remove unnecessary GIT_BRANCH export

* go mod tidy

* fix tests naming, improve coverage

* make flaky TestMemData_FlagListBlocked reliable
2019-11-17 15:47:01 -06:00
Umputun 6f969a0a76 fix _example test call 2019-11-11 18:55:23 -06:00
Umputun ae40fbeaf4 add example test 2019-11-11 18:52:13 -06:00
Umputun 21e6360ca4 update deps and vendor 2019-11-11 18:50:30 -06:00
Umputun 6abb2727c4 switch to lcw cache 2019-11-11 18:50:09 -06:00
Umputun f86f7dcc23 typo 2019-11-11 09:33:20 -06:00
Umputun b41c539d48 Merge branch 'master' of github.com:umputun/remark 2019-11-11 09:29:39 -06:00
Umputun 5d50f0d794 typo 2019-11-10 17:02:34 -06:00
UmputunandGitHub ffec9272ce Merge pull request #475 from Smolevich/fix-readme
Add href for new paragraph in README.md
2019-11-10 16:23:54 -06:00
Umputun 0672cb41d4 change From email to example.com 2019-11-10 16:17:41 -06:00
Umputun f821049d34 add docs about email 2019-11-10 13:13:43 -06:00
Umputun c5c065975a adjust tests for updated error logs 2019-11-09 13:50:14 -06:00
Umputun 731bcb9606 remove caller ip from logs on http errors 2019-11-09 13:45:36 -06:00
Umputun 0ebf5e1822 make docs to allow easier contributions #422 2019-11-09 13:33:36 -06:00
Umputun 9831f75ea9 promote rest errors to WARN level 2019-11-09 12:34:19 -06:00
Umputun 96d19afbb4 correct twitter auth description
https://github.com/umputun/remark/commit/38e9dc97e63890c3bd65970e888bf7d47c47e1ff
2019-11-09 12:14:57 -06:00
Shupilkin Stanislav Yurevich 2e473ae1b8 Add href for new paragraph in README.md 2019-11-08 18:24:34 +03:00
Umputun 38e9dc97e6 add auth twitter info 2019-11-08 01:54:13 -06:00
Umputun 18ae77a806 longer streamer timeout in cancel test 2019-11-06 17:01:43 -06:00
Umputun 9269666931 add simple-view param and env (SIMPLE_VIEW) #474 2019-11-06 13:47:45 -06:00
Dmitry VerkhoturovandUmputun 7536e265b2 Change coveralls to use build-in GITHUB_TOKEN (#465)
* change coveralls to use build-in GITHUB_TOKEN (should work in forks)

* send GITHUB_REF as GIT_BRANCH

* add debug output

* change service to github

* remove debug output

* move COVERALLS_TOKEN to environment, remove argument
2019-11-05 18:13:25 -06:00
Umputun 4c7e454d86 fix login url with wrong ? #463 2019-11-05 12:45:06 -06:00