Commit Graph
55 Commits
Author SHA1 Message Date
Anton KosourovandUmputun b3683c4f60 add tests for ssl mode (#226) 2018-12-08 22:46:10 -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 1432ec44d7 add unlimited votes constant to avoid magic -1 value on the caller side 2018-11-24 12:13:07 -06:00
Aleksandr MelnikovandUmputun f8517fd6a8 fixed zero vote limit not respected and treated as unlimited (#224)
* fixed problem when zero vote limit was not respected and was treated as unlimited

* fixed TestRest_Vote
2018-11-24 12:05:02 -06:00
Umputun dec2d0062c ssl redirect test 2018-11-04 13:13:56 -06:00
a.kosourov 0e84c61c96 move ssl parts to ssl.go 2018-11-04 16:15:45 +03:00
a.kosourovandakosourov 614e87d17c fix linters warnings 2018-10-28 18:16:00 +05:00
a.kosourovandakosourov 5ebfb1518a Add https support, static mode for rest server 2018-10-28 18:16:00 +05:00
Umputun 904bc11c09 add lastCommentsScope to blocking rest 2018-10-27 13:20:50 -05:00
UmputunandGitHub 8c5531b178 Notify (#211)
* add notify service with no destinations

* change to request for destinations

* add telegram notify and wire to main

* lint: missed err checks

* fix notify factory

* externalize timeout for notify

* fix race in notifier mock

* lint: check notify send status in tests

* lint: write warn

* lint: wrong assignment

* lint: two more writes in tests

* missing notif timeout default
2018-10-24 22:28:56 -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
UmputunandGitHub 75a1edcff3 feature/adm_mongo (#201)
* add admin akd key mongo implementations

* wire admin and key stores to mongo

* lint: wrong comment on keys store

* typos and comments corrections

* fix failed test on avatar resizer

* get rid of ineffectual assignment in test

* add tests for encoding fallback and mongo's keys & admin

* empty encode test adjusted
2018-09-09 16:59:33 -05:00
Umputun 93347df190 Merge remote-tracking branch 'origin/master' 2018-09-06 10:35:48 -05:00
Umputun d4c36edc55 add delete flag to edit request #200 2018-09-06 10:35:31 -05:00
Umputun 061ceb4f81 lint: unused field in admin 2018-09-05 20:57:33 -05:00
Umputun 1b3904a307 populate common params to commands 2018-09-05 02:13:57 -05:00
UmputunandGitHub 84e7770359 Feature/admin-migrator (#198)
* auth with a secret as admin

* get rid of separate migrator service

* clean sanitize dbg prints

* fix dbg logging and set migrator routes
2018-09-03 23:13:29 -05:00
UmputunandGitHub 0cd76dfd2f Feature/admin_store (#197)
* generalize admins and email info with store interface

* lint: missing group comment

* fix admin group with shared substruct
2018-09-02 13:00:20 -05:00
UmputunandGitHub ba6bab5b91 Feature/cmd (#195)
* support flags commands, move to cmd

* fix target name

* test for happy path importer

* add export cmd

* fix wrong import, lint warns

* increase test timeout

* add sellp to allow main test server to start

* implement all cmds

* handle backup/restore errors

* fix import status check, hide secret from logs

* backup cmd err tests

* randimize test port

* avoid dup code in Last controller

* add target to make all bin archives

* remove container in make

* add smiple scripts to simplify commands, update readme

* add docs on dockerless, enforce app user

* add restore info

* move last to lastCommentsScope const
2018-08-26 21:45:04 -05:00
Umputun 031a25ad92 Merge branch 'master' of github.com:umputun/remark 2018-08-18 22:38:13 -05:00
Umputun f3880aa302 add a test for \n handling in wp, fix incorrect curl param caused removal of \n #156 2018-08-17 16:12:02 -05:00
Umputun 03eb57ef81 too many backticks by mistake 2018-08-16 18:57:41 -05:00
Umputun 8d9622cfd0 shutdown after import test 2018-08-16 18:48:34 -05:00
Umputun a05b0b81c0 add test for reported MD case https://github.com/umputun/remark/issues/156#issuecomment-413548318 2018-08-16 18:37:57 -05:00
Umputun 8503e31f64 reformat imports 2018-08-15 22:14:30 -05:00
UmputunandGitHub 30ff1dacde feature/artifact (#190)
* embed assets for web with separate dockerfile

* add artifact dockerfile

* add artifacts upload to github release

* fix statik params and add make for local builds

* fix docker image name to match compose

* fix typos
2018-08-12 14:24:46 -05:00
Umputun c459b31aa8 fix typos in struct names 2018-08-11 11:29:31 -05:00
UmputunandGitHub 2ff955edf1 feature/comment-formater (#186)
* extract comment formatter functuionality to allow md in #156

* add abilty to pass multiple convertors to formater
2018-08-10 19:35:45 -05:00
UmputunandGitHub 1b9ee3d763 feature/keystore (#185)
* add keyStore and switch all secret usage to this store

- implement static ks
- add shared secret

* lint: shadow in jwt and missing comment

* rename static key group to shared and use top-level shared secret

* move siteID extraction (from token) to internal func

* lint: merge var and assign for key test
2018-08-08 14:33:18 -05:00
Anton KosourovandUmputun 39e426bd4b Add wordpress importer (#182)
* add wordpress, test

* add wp migrator to rest

* add readme, fix test, fix error handling
2018-08-02 22:05:53 -05:00
UmputunandGitHub e79b95de0c Feature/cors (#183)
* add cors internally #160

* revendor
2018-08-02 19:26:34 -05:00
Umputun cd7e9832d2 add avatart removal path to deleteMe test 2018-07-25 13:17:42 -04:00
Umputun 1c97e0d31f add delete avatar and call it from deleteMe controller 2018-07-25 12:48:57 -04:00
UmputunandGitHub 3520de768d feature/mongo cache (#180)
* add siteID to cache Get

* indirect option setters

* add mongo cache with tests, add Key and Flusher

* lint: minor warns

* workaround for cache parallel test

* repeater in mongo cache

* missing repeater vendor

* fix nop cache

* add cache mongo benchmark

* wired mongo cache, single opts group for mongo

* disable goconst

* stop cache repeated on not found error

* use local mongo for tests in travis
2018-07-24 18:43:53 -04:00
Aleksei GurianovandUmputun fdf161850b Close DataStore on cleanup in tests (#173)
Windows fs can't remove testDb until file still used.
Therefore we need to close datastore on cleanup.
2018-07-19 09:33:40 -05:00
Umputun 7e00d40596 simplify user parsing with MustGetUserInfo 2018-07-19 00:08:13 -05:00
Umputun 0ae7f226af extend jwt claim with flags 2018-07-18 21:05:51 -05:00
Umputun 3abe4146b1 add deleteme flag to jwt token
it should prevent misuse of laked token to request user's data removal
2018-07-18 16:56:23 -05:00
Aleksei GurianovandUmputun 10e79cdd90 another flaky ttl block test (#172)
see #120
2018-07-18 13:27:56 -05:00
UmputunandGitHub de013c7d5a feature/mongo (#165)
* WIP: start mongo engine

* WIP: mongo accessor and admin

* integrate mongo store to main

* disable mongo tests by default, only in CI

* connection with constructor

* add mongo buffered writer

* buffered mongo writer

* fix nil responses on an empty list from mongo

* missing mongo index for scores

* cancelable store

* add gridfs implementation of avatar store

* fix race on mongo session copy

* gridfs avatars without tmp files

* move avatar store

* minor comments and refactoring for avatar store

* merged from current master

* simplify gridfs reader

* lint: fix minor warns

* test mongo against env defined url

* pass MONGO_REMARK_TEST to docker and travis

* set dockerfile env for mongo test url

* increase connect timeout in mongo tests

* pass MONGO_REMARK_TEST to drone build

* add MONGO_REMARK_TEST to branch stage of drone

* mass mongo test url via build_args_from_env

* populate mongo IP to docker build hosts

* test env

* pass mongo ip via .mongo

* remove .mongo temp from git

* add .mongo -> env to linter step

* allow more time to autoflush writer test

* default mongo tests to "mongo" if not in env

* merge fresh master into

* add test for mongo cleanup

* msg for a failed test

* lazy fix for failed test

* add an ability to skip all mongo tests

* add backend dev instructions

* remove unused code from mongo server

* move mongo testing to connection_test

* restore testing.go

* lint: minor warns for testing code
2018-07-13 12:27:11 -05:00
Umputun 547ea8375e change deletem result link to /web #73 2018-07-10 17:05:03 -05:00
Umputun b6cda91dd9 invalidate user_id scope on vote change #151 2018-07-10 02:02:17 -05:00
Umputun ce8c2c236f add last scope 2018-07-09 02:52:13 -05:00
Umputun b2f2156460 change rss reply scope to site 2018-07-09 02:48:35 -05:00
Umputun 0ee7a6940a increase last to 1000 for reply rss, add to readme 2018-07-08 23:54:00 -05:00
Umputun 0c7b6589f2 simplify erro handling for reply rss 2018-07-08 23:23:05 -05:00
Anton KosourovandUmputun 75249bd7fe RSS replies to a user #111 (#145)
* add rss feed for replies to user

* fix add consts
2018-07-08 23:12:50 -05:00
Umputun 841934f44b lint: unused contextkey, leftover from rewrite middleware integration 2018-07-01 11:53:43 -05:00
Umputun 70649b2712 route /index.html #103 2018-07-01 11:50:02 -05:00