Commit Graph
2141 Commits
Author SHA1 Message Date
Pavel MineevandUmputun 01f19ea511 fix rtl typing in ie11/edge 2020-01-05 12:58:54 -06:00
tim.ivaikinandUmputun a4d10f54dd Support for 3x devices including 11 Pro and MacPro 2020-01-05 12:58:25 -06:00
tim.ivaikinandUmputun 0462cbcd9e Added retina display support 2020-01-05 12:58:25 -06:00
Umputun d0925ba95f ident ci lists for better readability 2020-01-04 21:09:27 -06:00
Umputun d06a27193c add codeowners file 2020-01-04 20:49:56 -06:00
Dmitry Verkhoturov c56c39c59d separate build and test CI workflow, separate frontend and backend tests 2020-01-04 20:53:39 +01:00
Dmitry VerkhoturovandUmputun b7980849b2 improve TestService_WithDrops failure output 2020-01-04 12:53:31 -06:00
Dmitry VerkhoturovandUmputun 88e46446b6 remove empty lines from dockerfile 2020-01-04 12:53:31 -06:00
Umputun 3307394932 don't run any test on rundev target, use private compose 2020-01-04 01:36:44 -06:00
Pavel MineevandUmputun c69e375e45 Add "simple view" mode (#502)
* Add "simple view" mode support

It just hide elements from view when SIMPLE_VIEW recived from server

* Fix typing and add ts check before push

* proper input styling

* Changes for frontend dev compose

* remove SIMPLE_VIEW from default settings for forntend dev
* add private compose to gitignore

* Added simpleView mode for replay and edit modes.

* `simpleView` changed to required param

* FIx border-width in reply form

* Fix border-width in editing mode
2020-01-04 01:31:06 -06:00
Dmitry VerkhoturovandUmputun 4cae7f0324 make TestServerApp_MainSignal more robust 2020-01-02 14:35:50 -06:00
Dmitry VerkhoturovandUmputun 07a14edc3b adjust name for CI build with frontend tests 2020-01-02 14:35:50 -06:00
Umputun b434f52aa1 resolve potentially concurrent writes to bolt in service tests 2020-01-02 14:02:16 -06:00
UmputunandGitHub ffc81f1f78 Merge pull request #519 from akellbl4/fix/hide-error-in-email-form
Hide error after repeated request in email login form
2020-01-02 11:54:50 -06:00
Pavel Mineev ff83b446b8 Fix error hiding after repeated request 2020-01-02 15:19:13 +03:00
UmputunandGitHub 82d0cb97d1 Merge pull request #518 from mullakhmetov/close-testserver
Shutdown test servers
2020-01-01 16:13:37 -06:00
Artur Mullakhmetov 2d942f0a2c Shutdown test servers 2020-01-02 00:29:43 +03:00
Artur MullakhmetovandUmputun 12b916b097 Make test offline friendly 2020-01-01 15:14:26 -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
Pavel MineevandUmputun 25782d7d3e fix ts error 2019-12-30 15:53:33 -06:00
Umputun 4352c86d1f Merge branch 'master' of github.com:umputun/remark 2019-12-30 15:31:05 -06:00
Umputun 9660f7ea7e add more private composes to ignore 2019-12-30 15:25:13 -06:00
Dmitry VerkhoturovandUmputun a1f8ad7bd8 expose email_notifications flag on /config endpoint (#514) 2019-12-30 15:05:55 -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