Commit Graph

642 Commits

Author SHA1 Message Date
Thales Macedo Garitezi 3ae378e717
chore: enable easy printing ct logs during dev 2022-04-08 15:58:35 -03:00
JimMoen 5a2299053f chore: update dashboard for 5.0 2022-04-08 18:28:28 +08:00
Thales Macedo Garitezi ca25053cd5
fix: add common dependencies to `%-pkg` target in makefile
On a fresh clone, this will setup rebar, the dashboard and merge the
configs.
2022-03-28 11:40:27 -03:00
Xinyu Liu 9a4a8ec022
Merge pull request #7417 from JimMoen/update-dashboard
chore(dashboard): update dashboard version
2022-03-25 17:28:00 +08:00
JimMoen 520d0c862d chore(dashboard): update dashboard version 2022-03-25 15:43:19 +08:00
Zaiming (Stone) Shi b49df4599a build: use latest builder images (alpine 3.15.1)
OpenSSL-1.1.1n
2022-03-25 07:38:39 +01:00
Zhongwen Deng 88e0c4067f fix: api_plugins common test failed bump dashboard to v0.25.0. 2022-03-21 17:56:22 +08:00
Zaiming (Stone) Shi f9aba61dbb ci: run ct in concurrent jobs 2022-03-15 20:40:22 +01:00
Zaiming (Stone) Shi a1e7ece192 chore: use app name for coverdata name when running per-app ct 2022-03-15 15:36:44 +01:00
Shawn 9db21acc96 chore: pin dashboard v0.23.0 2022-03-11 20:16:42 +08:00
Zaiming (Stone) Shi bed3c8bc51 build(Makefile): app ct should produce coverdata 2022-03-09 13:05:51 +01:00
Thales Macedo Garitezi 1f59154dca
fix(elixir): add common target dependencies for `%-elixir-pkg`
For installing Hex/Rebar and downloading dependencies on a fresh
clone.
2022-03-03 13:56:30 -03:00
Zaiming (Stone) Shi 0f93c23936
Merge pull request #7186 from zmstone/structured-build-info
build: more structured build info
2022-03-02 23:58:08 +01:00
Zaiming (Stone) Shi e6495f4300 ci: upgrade emqx-builder to 5.0-8:1.13.3-24.2.1-1 2022-03-02 21:57:26 +01:00
Zaiming (Stone) Shi 4e64010a3b build: more structured build info 2022-03-02 21:22:03 +01:00
JianBo He 612611c954 chore: update dashboard vsn to 0.21.0 2022-03-02 10:48:39 +08:00
Zaiming (Stone) Shi b68cb96bd2 refactor: make pkg-vsn.sh able to report both short and long version 2022-02-26 01:38:10 +01:00
Zaiming (Stone) Shi 2d3859a79a build: get full version from pkg-full-vsn.sh
this is due to the mapping of :
centos7 -> el7
and rockylinux8 -> el8

with this fix, there is no need to repeat such mapping
in many differennt places
2022-02-25 11:33:01 +01:00
Thales Macedo Garitezi 8cac5f6b39
chore(ci): update emqx-builder image
Uses Elixir 1.13.3 and OTP 24.2.1-1.
2022-02-23 15:00:07 -03:00
JianBo He ffacfe9664 chore: update dashboard to 0.20.0 2022-02-22 15:42:39 +08:00
zhanghongtong 093e7c3282 build(relup): add new script for download relup base packages 2022-02-16 18:23:02 +01:00
JimMoen 2a1fba97da test(auth): resource use connector provided default port 2022-02-15 10:41:26 +08:00
JianBo He c6c6b7af89 chore: upgrade dashboard to v0.19.0 2022-02-14 17:37:33 +08:00
Zaiming (Stone) Shi c643db6bca build: move otp version check to rebar.config.erl 2022-01-31 16:39:14 +01:00
Zaiming (Stone) Shi 4fe7b93c43 build(Makefile): define Makefile vars before use 2022-01-31 16:38:41 +01:00
Thales Macedo Garitezi a597e92576
chore(mix): use MIX_ENV to define build profile and edition 2022-01-28 17:24:35 -03:00
Thales Macedo Garitezi 506dad169a
chore(elixir_otp): bump emqx-builder images 2022-01-26 16:59:50 -03:00
Thales Macedo Garitezi 9c68f4bd11
fix(tgz): replace zip with tgz after rebase 2022-01-26 16:59:49 -03:00
Thales Macedo Garitezi 3ec7d9ae24
chore(ci): use new tagged image with elixir 2022-01-26 16:59:49 -03:00
Thales Macedo Garitezi 59f0d5f537
chore(mix): use flag instead of elixirpkg to denote package type
Also, add Makefile target to build zip files with Elixir.
2022-01-26 16:59:49 -03:00
Thales Macedo Garitezi a91880780a
chore(elixir): change image/package versioning convention
We now go from "most specific" to "most general" versions: Elixir ->
OTP -> OS.
2022-01-26 16:59:48 -03:00
Thales Macedo Garitezi bc498a8041
ci(mix): add fvt tests and docker images with elixir 2022-01-26 16:59:48 -03:00
Thales Macedo Garitezi 6dd11665bb
ci(mix): build emqx packages with elixir 2022-01-26 16:59:48 -03:00
Zaiming (Stone) Shi 391e480824 build: parameterise package version
so that community and enterprise edition can be built from the
same branch
2022-01-26 14:25:59 +01:00
k32 bdc6d18589 feat(bpapi): Version negotiation 2022-01-26 11:59:21 +01:00
Zaiming (Stone) Shi dcb7977338 feat: show config doc in dashboard 2022-01-14 11:56:10 +01:00
Zaiming (Stone) Shi bf334fecb8
Merge pull request #6726 from zmstone/refactor-build-tar-gz-instead-of-zip
refactor: build tar gz instead of zip
2022-01-13 22:29:35 +01:00
k32 aa54c6135b fix(bpapi): Move static checks to test directory 2022-01-13 20:58:33 +01:00
Zaiming (Stone) Shi 638a9d1af7 build: change to build .tar.gz instead of zip 2022-01-13 18:54:01 +01:00
k32 b2b6cff469 revert(makefile): Remove lightweight dialyzer target 2022-01-12 15:40:44 +01:00
k32 6a1ada8623
Merge pull request #6691 from k32/bpapi-run-check
test(bpapi): Run static checks in CI
2022-01-11 13:25:06 +01:00
k32 26f4b2495b test(bpapi): Run verification in CI 2022-01-11 11:26:35 +01:00
William Yang 202e23987d
Merge pull request #6677 from qzhuyan/dev/william/add-light-dialyzer-check
chore: add light dialyzer make target
2022-01-11 09:39:58 +01:00
Zaiming (Stone) Shi b2684b995d build: doc for win 2022-01-10 12:30:01 +01:00
William Yang 0d37ee9588 chore: add light dialyzer make target
for low mem dev machines
2022-01-07 11:09:17 +01:00
JimMoen 9a115b99a4 Merge remote-tracking branch 'emqx/release-5.0-beta.3' into merge-5.0-beta.3-to-master 2022-01-06 14:08:45 +08:00
JimMoen 2c1f4d4860 chore(dashboard): update dashboard version to v0.17.0 2022-01-05 12:52:26 +08:00
Zaiming (Stone) Shi 05ccedd8ec Merge remote-tracking branch 'origin/master' into merge-5.0-beta.3-to-master 2022-01-04 17:32:50 +01:00
Zaiming (Stone) Shi 3c79966d8b build: remove 'compile' step before 'release'
'compile' is implict dependent step for 'release'
2022-01-04 14:47:17 +01:00
JimMoen 54ec3009ee chore(dashboard): update dashboard version to v0.16.0 2022-01-04 17:23:54 +08:00
JimMoen d627d9e69e chore(dashboard): update dashboard version to v0.14.0 2021-12-30 23:05:54 +08:00
JimMoen e2804ab29d chore(dashboard): update dashboard version, ignore v0.9.0 2021-12-23 09:25:58 +08:00
JimMoen 2130d5ca8e chore(dashboard): update dashboard version 2021-12-23 09:25:58 +08:00
zhouzb bac2fa6905 chore(dashboard): update dashboard version 2021-12-20 15:24:49 +08:00
JimMoen 7c8e452a3c chore(dashboard): update dashboard version 2021-12-17 10:54:50 +08:00
JimMoen 257ee19be5 chore(dashboard): change dashboard repo and version 2021-12-09 11:31:31 +08:00
Zaiming (Stone) Shi 34d3a73ff3 test: force segment er-merge before any ct 2021-12-06 08:00:42 +01:00
Zaiming Shi e2d7ff2b0f build: rename emqx-ee to emqx-enterprise 2021-11-29 14:53:47 +01:00
Zaiming Shi 9496c76fe8 build(Makefile): find command's -delete option instead of xargs rm 2021-11-20 21:44:37 +01:00
Zaiming Shi a705bc1fc7 build: change package name scheme
`${PROFILE}-${PKG_VSN}-otp${OTP_VSN}-${SYSTEM}-${ARCH}.zip`
2021-11-20 20:44:48 +01:00
Zaiming Shi 25d6a98aa4 build: get otp version and export OTP_VSN 2021-11-20 20:44:48 +01:00
Zaiming Shi 204a80697f build: add emqx-ee and emqx-ee-pkg targets 2021-11-20 20:44:48 +01:00
Tobias Lindahl 48c7788d6f
Merge pull request #5875 from emqx/extend-persistent-sessions
Extend persistent sessions
2021-10-27 09:12:13 +02:00
JimMoen ba146c8a46 chore(dashboard): update version for dashboard 2021-10-22 17:34:28 +08:00
Tobias Lindahl 566f24e5d8 test: add make target for running isolated test suites 2021-10-21 15:23:21 +02:00
zhongwencool d784e63b9f
emqx_conf (#5939)
* feat(emqx_conf): move conf manager for emqx_machine to emqx_conf

* chore(emqx_conf): change emqx:get_config/2 to emqx_conf:get/2

* fix: common test failed

* fix: badmatch by typo wrong key

* fix(emqx_conf): get the wrong core nodes

* fix(emqx_conf): get core node's tnx_id not latest tnx_id

* fix: add ro_transation when copy conf file

* fix: delete debug info

* fix: change ekka_rlog to mria_rlog

* fix: remove cluster_rpc from emqx_machine.

* fix: don't call ekka:start/0 explicitly

* fix: ekka should be start in emqx_machine
2021-10-21 18:08:51 +08:00
JimMoen 623cd5f528 chore(dashboard): update version for dashboard 2021-10-15 18:59:58 +08:00
zhanghongtong c944e36085 build: update dashboard version 2021-09-30 15:36:54 +08:00
JimMoen 0d16873175 chore(dashboard): update version for dashboard 2021-09-27 10:03:03 +08:00
JimMoen 22e8c83a52 chore(dashboard): update version for dashboard 2021-09-23 18:53:49 +08:00
zhouzb 1881c7a162 chore(dashboard): update version for dashboard 2021-09-10 18:30:25 +08:00
DDDHuang 455baa5465 feat: dashboard UI version, beat 11 2021-09-07 08:28:36 +08:00
DDDHuang 8f6931e5b0
feat: update dashboard ui beta10 (#5644) 2021-09-03 16:07:44 +08:00
Turtle f482ff8116 fix(dashboard): Update dashboard version to 5.0-beta.9 2021-08-27 21:18:29 +08:00
Turtle 5a0516735f fix(dashboard): Update dashboard version to 5.0-beta.8 2021-08-27 20:38:34 +08:00
Turtle 56f7d64d79 fix(dashboard): Update dashboard version to 5.0-beta.7 2021-08-27 20:38:34 +08:00
Turtle 765c730b92 fix(dashboard): Update dashboard version to beta.6 2021-08-27 13:46:53 +08:00
Turtle 88eb4aee64 chore(Dashboard): Update dashboard tag 2021-08-13 16:57:38 +08:00
Turtle 60171d184f chore(dashboard): upgrade dashboard tag to v5.0.0-beta.4 2021-08-10 17:58:42 +08:00
zhanghongtong b69059d442 build: easier build docker
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-08-04 09:31:02 +08:00
Turtle 32534d2372 chore(dashboard): update get-dashboard script 2021-08-03 17:21:01 +08:00
Zaiming Shi eb88d3591c chore: pin rebar3 3.16.1-emqx-1 2021-07-26 09:11:48 +08:00
William Yang 4ac71eca57
* feat(quic): quicer vsn 0.0.7 2021-07-20 09:57:15 +08:00
Turtle 918a26e921 feat(conf): merge all conf to emqx.conf 2021-07-02 17:01:16 +08:00
Zaiming Shi 0452bdb056 build: upgrade to rebar3 version 3.14.3-emqx-8
relup could not read appup file error reason was not printed
rebar3 3.24.3-8 (with relx 4.3.0-emqx-3) fixed it
2021-06-04 16:58:01 +02:00
zhanghongtong 6595d53962 build(relup): update build script for support relup 2021-05-07 21:25:10 +02:00
Zaiming Shi 958143f7a9 fix(frontend): dashboard 4.3.1 for a security patch 2021-05-07 18:44:39 +02:00
Zaiming Shi 396cae26fe build: fix build order of release and relup 2021-05-07 17:58:32 +08:00
Zaiming Shi 05835f2fab chore(dashboard): pin dashboard version v4.3.0 2021-04-30 12:26:59 +02:00
JianBo He 4f6216b812 build(test): add proper checking targets for each application 2021-04-13 18:10:21 +08:00
Zaiming Shi 4116806544 chore(build): upgrade to rebar3 3.14.3-emqx-6
This rebar3 version has two fixes comparing to 3.14.3-emqx-5
1. For elixir plugin build, ensure vsn in app info
2. Error details in rebar3 exception if .app is not found
   when generating release
2021-04-11 11:31:59 +02:00
JianBo He 8c1a773057 chore(dashboard): upgrade front-page version 2021-04-08 19:23:45 +08:00
Zaiming Shi f363bea960 chore(Makefile): Add make run and make quickrun 2021-03-29 09:42:07 +02:00
Zaiming Shi 45dfc8a2fa chore(test): make app-ct run easier 2021-03-20 11:20:48 +01:00
Zaiming Shi 73a8494760 fix(build): rebar3 compile before release
Doing release directly works fine for prue Erlang dependencies.
However if we add a elixir dependency, the application
info and release becomes problematic

Elixir apps do not have .app or .app.src files
so the app vsn can not be found during app discovery
which leads to "No valid version ([]) of .app file found"
error when creating the release.
This is maybe fixed in https://github.com/erlang/rebar3/pull/2518

Another issue is "Undefined applications: [elixir,logger]"
This seem to be caused by the rebar3 not being able to identify
as a release dependency if an elixir app was not compiled before.
2021-03-19 12:22:43 +01:00
Rory Z 862e484944
chore(CI): build workflow support enterprise repo (#4363) 2021-03-18 16:30:48 +08:00
Zaiming Shi d9a937cd34 chore(build): No rebar3 color for windows 2021-03-15 08:04:39 +01:00
zhanghongtong c5f0194af7 chore(CI): fix build error on windows 2021-03-15 07:31:53 +01:00
Zaiming Shi 5f064a8e42 chore(test): enable cover only when necessary
So that ad-hoc ./rebar3 eunit and ct can run faster
2021-03-11 19:06:03 +01:00
Zaiming Shi e1979bf488 chore(build): Single source of EMQX_DESCRIPTION 2021-03-09 20:22:48 +01:00
Zaiming Shi 7eb6588cc9
Chore build update rebar3 version (#4303)
* chore(Makefile): Delete unnecessary exports for deps-get

* chore(rebar3): upgrade to rebar3 version 3.14.3-emqx-5

This rebar3 version does not copy .git directory.
Before this, if a plugin repo clone is placed in lib-extra,
rebar2 ct or eunit commnad may fail at source code copy step.
2021-03-09 08:50:24 +08:00
Zaiming Shi b7bde35b51 chore(Makefile): delete .o .d files when make clean 2021-03-08 11:35:15 +01:00
Zaiming Shi 625755ea33 chore(Makefile): refine 'make clean' 2021-03-07 09:49:11 +01:00
Zaiming Shi 73500a0983 chore(build): inject product description from makefile 2021-03-06 08:41:50 +01:00
Zaiming Shi 3e3c06118c chore(build): Ensure git hooks from Makefile 2021-03-06 08:41:50 +01:00
Zaiming Shi 609b015f93 chore(build): Use different env variable for dashboard version 2021-03-05 10:51:50 +01:00
Zaiming Shi cd0890796d chore(build): use only mark file to tell apart ce ee 2021-03-02 23:38:10 +01:00
Zaiming Shi b166ee5651
Merge pull request #4254 from zmstone/chore-build-fail-fast-if-otp-is-too-old
chore(build): Fail fast on old version OTP
2021-03-01 20:28:56 +01:00
Zaiming Shi 6c21a9473a chore(build): Fail fast on old version OTP 2021-03-01 19:48:27 +01:00
Zaiming Shi 11ad9caeda chore(dashboard): Pin dashboard frontend tag v4.3.0-beta.1 2021-03-01 16:34:37 +01:00
Zaiming Shi 30293b602a chore(build): move rebar3 download script to scripts dir 2021-03-01 21:00:17 +08:00
Zaiming Shi 534b6c0062 chore(scripts): get-dashboard.sh accepts URL as arg
Also move it to scripts dir
2021-03-01 21:00:17 +08:00
Zaiming Shi 7afeadd6fc chore(ci): run eunit test in github action 2021-02-26 20:50:07 +01:00
Zaiming Shi e7785a63ee fix(scripts): update scripts to work with new lib-opensource dir 2021-02-11 17:22:20 +01:00
JianBo He 045bc02ec9 test(ci): add proptests chekcing to the makefile 2021-02-04 14:22:17 +08:00
JianBo He 52c747ca6b chore(cover): add coverall back 2021-02-04 14:22:17 +08:00
zhanghongtong ca1e78677e chore(dashboard): delete static files
delete static files of dashboard and download them during build
2021-01-05 17:22:19 +08:00
Shawn 1887dfa8a4 fix(test): set node name to 'test@127.0.0.1' when run ct 2020-12-28 16:02:04 +08:00
Shawn a9629a931b chore(test): add coverage generation for make ct 2020-12-23 13:48:49 +08:00
zhanghongtong a364758e2a test(emqx_recon): stop emqx correctly in the test case 2020-12-22 13:39:49 +08:00
zhanghongtong fd6cc1a848 test(CI): update actions
add fvt tests

update test cases
2020-12-17 14:23:33 +08:00
Zaiming Shi 1236c1934c chore(build): refine packages builds
This commit merge packages.mk into Makefile
with the complex part moved to shell script ./build.
2020-12-16 09:22:47 +01:00
Rory Z c0f03ca132
test(CI): add actions for build emqx packages (#3915) 2020-12-15 13:34:11 +08:00
Zaiming Shi 8bb5dc5e66 chore(build): Add examples of how to run test cases in README 2020-12-14 00:18:56 +01:00
Zaiming Shi 952c140138 chore(build): Skip relup when there is no upgrade base 2020-12-12 23:02:26 +01:00
Zaiming Shi 075c40aa05 chore(build): Fix relx config for emqx config files overlay 2020-12-12 23:02:26 +01:00
Shawn 10dbb5bc96
Fix testcases warns (#3906) 2020-12-11 18:54:48 +08:00
Zaiming Shi 7bdd093ef5 Merge remote-tracking branch 'origin/dev/v4.3.0' into umbrella-fix-build 2020-12-11 08:55:57 +01:00
Zaiming Shi 08d4678ac7 chore(build): Pin rebar3 version 3.14.3-emqx-2
Rebar3 3.14.3-emqx-1 always copy non-deps app dirs. i.e. never
try to simlink them.
2020-12-11 08:29:45 +01:00
Zaiming Shi 9fc482e0e5 chore(build): fix duplicated Makefile targets 2020-12-11 08:19:26 +01:00
Zaiming Shi d67212e7fa chore(test): Make test profile build 2020-12-11 08:19:26 +01:00
Zaiming Shi 93a35c4814 chore(build): add 'check' profile for xref and dialyzer 2020-12-10 12:03:16 +01:00
Zaiming Shi ded92cc10b chore(Makefile): delete stamp clean 2020-12-10 11:42:58 +01:00
Zaiming Shi 558f28ba27 refactor(build): Add dialyzer Makefile target 2020-12-10 09:35:27 +01:00
Shawn 12e0028b77 fix(mgmt): remove schema_registry calls from opensource code 2020-12-10 16:30:48 +08:00
Zaiming Shi 377f01e038 refactor(xref): Add xref Makefile target 2020-12-10 09:22:14 +01:00
JianBo He 49d15d974a build(make): add xref, dialyzer command 2020-12-09 14:21:54 +08:00
Zaiming Shi 9ecc669f14 chore(rebar3): Upgrade to rebar3 3.14.3-emqx-1 2020-12-06 14:57:51 +01:00
Zaiming Shi 0fb5fb31a5 refactor(proj) sync 4.3.0 plugins with tracked files 2020-12-05 02:43:04 +01:00
Zaiming Shi ba204b5ab8 chore(build): update rebar3 version 2020-12-02 17:06:26 +01:00
Zaiming Shi e0123574ed refactor(build): Ensure depth 1 git clone 2020-12-02 00:06:12 +01:00
Zaiming Shi 4e755d80db refactor(build): Download rebar3 from github release 2020-11-30 19:48:02 +01:00
Zaiming Shi dab57b0f0f chore(build): Update rebar3
This rebar3 puts a stamp to app build output dir
skips re-build if alreay built
2020-11-27 21:41:11 +01:00
Zaiming Shi a6566962e0 refactor(build): simplify version resolution 2020-11-27 01:03:40 +01:00
terry-xiaoyu 151d820058 feature(project): change to rebar3 umbrella project 2020-10-31 11:07:25 +08:00
JianBo He 1700a7a98a refactor(test): put all property cases to test/props directory 2020-06-18 17:38:34 +08:00
JianBo He e3489b9d46 refactor(style): improve all types declaration
- Add dialyzer for code analysis
- Correct all the module type declarations
- Use `-type()` to declaration a type instead of `-opaque`
  (It is advantageous to the code dialyzer)

BROKEN CHANGES:
- Add a ?DEFAULT_SUBOPTS for emqx_broker:subscribe/1,2,3
- Remove the needless internal function `emqx_vm:port_info(PortTerm, Keys)`
2020-06-18 17:38:34 +08:00
JianBo He e492260fe8 Change travis-ci to github action 2020-03-21 13:40:16 +08:00
JianBo He 40758fb693 Workflow (#3163)
Add workflows
2020-01-09 11:53:20 +08:00
张奇怪 c713d619da
Add more test cases (#2992)
* Add more test cases for emqx_stats and emqx_os_mon
Fix test case error for emqx_ws_connection

* Add more test cases for emqx_sys_mon

* Update erlang otp to 22.1 for travis ci

* Delete readable=false for make ct

* Add unset_all_env for emqx_zone and update test cases
2019-10-24 15:41:26 +08:00
Gilbert 79744af681 Wrapper proper test cases into common test cases (#2785)
* Wrapper proper test cases into common test cases

* Improve test cases for reason code module (#2789)

* Split 3 proper tests into 3 ct cases

* Improve test cases for client, rpc and request-response

* Add psk suites to increase coverage

* Add sys test cases
2019-08-16 18:07:12 +08:00
Gilbert 96b341fde5
Add proper tests for base62 (#2761)
* Add proper tests for base62

* Delete useless comment
2019-08-07 09:24:03 +08:00
Feng Lee c4faeab45a Move test/run_emqx.escript -> scripts/run_emqx.escript 2019-08-03 14:08:20 +08:00
GilbertWong 22f7280d8e Make sure the default make behaviour is `make distclean` 2019-06-25 15:27:05 +08:00
GilbertWong 13d33985be Fix enoent error in run_setup rule of the makefile
Prior to this change, if user's computer has no `~/.config/rebar3`
path, `make run` would fail and report enoent error.

This change fix the problem I described above.
2019-06-24 11:42:24 +08:00
Gilbert 20188f9189 Optimize develop workflow and support make run and code hot swapping (#2644)
* Optimize develop workflow and support make run and code hot swapping
2019-06-21 20:52:27 +08:00
Gilbert 1d23d7de86
Optimize test workflow (#2642)
* Optimize test suites workflow

* Better format of makefile

* Fix protocol suite

* Add emqx_access_SUITE
2019-06-20 11:44:44 +08:00
Feng Lee 1d88f8fd9e Improve the emqx_connection, emqx_ws_connection and emqx_frame modules (#2611)
* Adopt channel architecture and improve the MQTT frame parser

* Update the test cases for emqx_channel, emqx_protocol

- Improve emqx_client to Use the new emqx_frame:parse/2
- Update the ct suites for emqx_channel, emqx_ws_channel

* Fix test case
2019-06-14 12:44:27 +08:00
Gilbert d3e7d1f0c9 Fix websocket bug (#2615)
Fix websocket bug.

Prior to this change, websocket connection would be closed directly
without sending connack packet when acl check fails.

This change fix this bug.
2019-06-14 11:33:44 +08:00
Gilbert Wong 3f53c3822d Fix ct rule in makefile 2019-05-17 10:27:14 +08:00
Gilbert Wong 8065cafe1d Restore app.confg rule in makefile for debug and test 2019-05-08 21:18:24 +08:00
spring2maz d0131ec663 Pin emqx-ct-helpers v1.1 (#2495)
* Pin emqx-ct-helpers v1.1.1

* Fix loaded_plugins touch command
2019-05-04 04:41:08 +08:00
spring2maz 97476b8bde Build with rebar3 (#2475)
* Pin cuttlefish rebar3 branch

* No shallow clone for rebar3

* Replace timer:sleep with receive after for deterministic

* Build with only rebar3

* bbmustache as a test dependency

* Change to plain deps

* Use shallow clone by default

* Add ct-helpers as test dep
2019-04-28 09:40:39 +08:00
HeeeJianBo 281fb2d5ec Depend emqx_ct_helper with tag 2019-04-25 14:30:35 +08:00
Gilbert Wong b3927ff730 Add emqx_ct_helpers as deps and refactor test suites 2019-04-25 13:41:22 +08:00
Gilbert Wong bcbb4b68e9 Add flapping detect feature 2019-04-19 16:34:33 +08:00
terry-xiaoyu 8be2defb6b Update ekka to v0.5.4 2019-03-30 10:41:48 +08:00
Gilbert 2534b8dc64 Support to pass ws compressing options (#2356)
Add new config entries about websocket
2019-03-27 10:19:35 +08:00
Gilbert Wong 7ff56b55f0 Force makefile to git clone deps 2019-03-16 23:05:15 +08:00
YoukiLin 88c32b2c41 Fix emqx_rpc badargs bug 2019-03-16 21:27:41 +08:00
Shawn 02fe8560e2
Improve emqx_hooks and credentials (#2309)
* Improve emqx_hooks and credentials

1. Modify the return modes of emqx hooks.

Change the return value of hook functions to:
- ok: stop the hook chain and return ok
- {error, Reason}: stop the hook chain and return error
- continue: continue the hook chain

And the return value of emqx_hooks:run/2 is changed to:
- ok
- {error, Reason}

And the return value of emqx_hooks:run/3:
- {ok, Acc}
- {error, Reason, Acc}

2. Treat password as a member of credentials.

Password should be wrapped in the `credentials` data-structure, as the
username/password pair together consists of an authentication method.
There can be some methods using some other credential data (e.g.
a JWT token), and these credential data should also be wrapped in the
the `credentials` data-structure.

An event `client.authenticate` is triggered when an user logs in:
```erlang
emqx_hooks:run('client.authenticate', [], Credentials)
```

A `default callback` that deny/allow any user (according to the
`allow_anonymous` config) should be appended to the end of the
callback chain.

The `credentails` is passed through all of the callbacks, and
can be changed over in this process.

* Refactor emqx hooks return mode

* Remove password from PState
2019-03-16 10:43:53 +08:00
turtleDeng b902ff3656 Update gen_rpc to v2.3.1 (#2315)
Update gen_rpc to v2.3.1
2019-03-15 10:30:14 +08:00
tigercl da755b88c7 Add monitors and alarm handler (#2266)
* Add monitors and alarm handler
2019-02-28 18:25:17 +08:00
Gilbert c26d13b057 Fix test case (#2275)
* Fix t_rpc test
2019-02-28 18:07:16 +08:00
Gilbert Wong 7efd7b3ec0 Rename portal to bridge 2019-02-28 15:31:54 +08:00
spring2maz 1626cade28 Deleted batch publish support in emqx_portal_client
eqmx_portal_mqtt has to do single message publish calls for now
Also fix a bug in emqx_portal_mqtt ack collector
2019-02-28 11:17:27 +08:00
spring2maz efc9e34033 Make use of BUMP_PACKET_ID the only way to generate packet IDs 2019-02-28 11:17:27 +08:00
spring2maz 6e1d4ec261 Add emqx_portal SUITE to default CT list 2019-02-28 11:17:27 +08:00
spring2maz 2903a810ce Add emqx_portal:ensure_foreard_present API 2019-02-28 11:17:27 +08:00
spring2maz fbe67e6784 Introduce new bridge impl 2019-02-28 11:17:27 +08:00
Feng Lee 565c1a8c85 Optimize unset_flag/2 and add some specs
- Optimize unset_flag/2
- Add some function specs
- Add emqx_message_SUITE to Makefile
2019-02-22 17:06:52 +08:00
张奇怪 44d3eff094 Auto-pull-request-by-2019-02-19 (#2232)
* Update Copyright to 2019 (#2191)

* Disable bridges by default (#2189)

* Fix warning logger args emqx#2195

* Ambiguity elimination (#2217)

* Fix emqx_ws_connection: prevent crashes on pong (#2210)

* Issue#2184 (#2194)

* Delete dep-vsn-check

* Format app.src
2019-02-19 14:00:34 +08:00
turtleDeng 00863acea3
Merge emqx30 (#2181)
* Change the reason code in will topic acl check (#2168)

* Fix bridge bug (#2160)

* Limit bridge QoS less than 1

* Improve shared sub dispatch implementation. (#2144)

* Upgrade ekka, esockd libraries

* Improve the 'try_open_session' function

* Reload config (#2180)
2019-01-25 13:01:48 +08:00
YoukiLin 3748cd434d Add test case for emqx_sys_mon (#2150) 2019-01-12 23:09:39 +08:00
terry-xiaoyu 99f4283458 Update cuttlefish to v2.2.1 2019-01-04 22:55:58 +08:00
YoukiLin 78b3c375d8
Improving 'emqx_ws_connection' coverage (#2107) 2019-01-03 12:59:39 +08:00
turtleDeng 6a1ebe299a
Merge emqx32 to emqx30 (#2112) 2018-12-28 19:44:41 +08:00
turtled 390fae1134 Rm clique dep 2018-12-21 17:09:15 +08:00
Feng Lee c93d0fb174 Add test cases for emqx_gc module 2018-12-21 10:28:33 +08:00
Feng Lee 14cffcf7fb Add the 'emqx_pd' module
Add utility functions for erlang process dictionary
Add test cases for emqx_pd
2018-12-20 16:45:25 +08:00
Feng Lee 721b72b96a Add 'active_n' option to optimize the CPU usage of emqx_connection (#2060)
* Add 'active_n' option to optimize the CPU usage of emqx_connection

* Supports batch processing 'DOWN' events
2018-12-17 19:53:29 +08:00
terry-xiaoyu d445c17e6c Move some vm args to file vm.args 2018-12-14 09:53:13 +08:00
Feng Lee b4d981daf2 Add a sequence module to generate index for subscription sharding 2018-12-04 15:59:24 +08:00
spring2maz 520a5e0225 Download erlang.mk and use git tag in appfile vsn 2018-12-03 15:16:53 +08:00
spring2maz b87e72861a Fallback to git clone -n then checkout if git version is older than 1.8 2018-11-30 11:03:26 +01:00
spring2maz 14dfe03426 Use git tag for app vsn 2018-11-30 11:03:26 +01:00
spring2maz fe33aeb3dc For git older than 1.8, there is no shallow clone support 2018-11-30 17:47:59 +08:00
Feng Lee 21ed012a0c Add an elegant batch module 2018-11-29 10:13:09 +08:00
Feng Lee 309f3560f3 Bump version to 3.0.0 2018-11-28 16:05:17 +08:00
Gilbert Wong d08ed351be Do no execute rebar-clean before distclean
Prior to this change, this project support to be built with rebar3 and
erlang.mk meanwhile but when we want to make distclean, this project
would execute rebar-clean which would get dependencies via rebar3, it
slow down the procedure of distclean.
2018-11-27 17:00:23 +08:00
Gilbert d13c5f8ec1
Reduce dep size (#1981) 2018-11-26 17:55:48 +08:00
Shawn 93a079752f Update cuttlefish to v2.1.1 (#1978) 2018-11-23 11:04:55 +08:00
tigercl 551d5d99d2 Change 'aquire' to 'acquire' (#1976)
* Change 'aquire' to 'acquire'
2018-11-23 11:00:30 +08:00
turtled faeda253e1 Fix conflicts 2018-11-10 11:44:55 +08:00
terry-xiaoyu f6266eaa93 Bumped the version number of deps 2018-11-02 19:42:51 +08:00
terry-xiaoyu 2a5f3e949c revert Makefile 2018-11-02 18:38:07 +08:00
terry-xiaoyu 94dbdffd59 New logger formatter with meta-data 2018-11-02 18:38:07 +08:00
terry-xiaoyu 2c63aef3f6 Update schema 2018-11-02 18:32:42 +08:00
spring2maz 28c8f2dd5c Remove neotoma plugin, build cuttlefish script in sub-dir 2018-10-27 14:21:53 +02:00
tigercl abb2e5c918
Improve test cases, and fix some bugs (#1920)
* Improve emqx_banned, emqx_pqueue, emqx_router test cases

* Improve emqx_broker test case, and fix bug in emqx_broker

* Add emqx_hooks to CT_SUITES
2018-10-26 17:27:02 +08:00
Gilbert 0b44c1b75f
improve_test_cases 2018-10-26 17:25:31 +08:00
Gilbert 7544a21e25
Add test cases for emqx_bridge, emqx_mod_rewrite (#1914) 2018-10-26 14:04:33 +08:00
tigercl 873a08dc94
Improve coverage for emqx_hooks, and add test case for emqx_mod_sup (#1892)
Improve coverage for emqx_hooks, and add test case for emqx_mod_sup
2018-10-19 16:21:43 +08:00
huangdan 73658b3953 Merged emqx_misc_SUITE to emqx_misc_tests (#1890)
* Merged emqx_misc_SUITE to emqx_misc_tests
2018-10-19 09:46:25 +02:00
Gilbert 4c40f75f4b Request & Response (broker and client) (#1819)
Add request & response support for CONNECT & CONNACK

Prior to this change, there is no validate and specified process for
Request-Response-Information and Response-Information

Also added basic Request/Response functionality to emqx_client implementation
2018-10-18 19:21:05 +02:00
spring2maz 4082f3ade2 Improve stats test
Before this change, the stats callback provided by emqx_broker_helper
was an anonymous function with module local context.
This commit changes it to a full fun M:F/A style callback for:
1. More robust to hot beam reload
2. Faster/smaller variable to construct
3. Easier test
2018-10-19 00:22:29 +08:00
HuangDan cb85c5fea0 Upgrade the esockd library to v5.4.2 2018-09-29 18:59:35 +08:00
HuangDan 2a0bbd1c37 Fixed errors './cuttlefish: command not found' when running make app.config 2018-09-28 16:52:14 +08:00
spring2maz 8a8729f9ea Make rebar3 xref work.
Fixed a bad call in emqx_mod_subscription module
also commented out dead code for now in emqx_config.erl
2018-09-25 22:09:13 +08:00
turtleDeng 925e98a3e5
Merge pull request #1823 from emqx/add-shared-sub-strategy
Add new shared subscription dispatch strategy
2018-09-22 19:30:08 +08:00
HuangDan a46a1a2525 Upgrade the esockd library to v5.4.1 2018-09-22 18:34:18 +08:00
spring2maz b35d37c92d Add new shared subscription dispatch strategy
'random' was already there before this change
Added two new strategies: 'sticky' and 'round_robin'
'sticky' is made default as it is the cheapest
2018-09-22 10:50:34 +02:00
turtleDeng 8653732bae Revert "Calculate the 1.5 keep alive time exactly" 2018-09-22 14:52:31 +08:00
周子博 b1d4ec750a Remove the same test cases as emqx_keepalive 2018-09-20 17:58:54 +08:00
HuangDan 3822ff987b Fix function args
Add test cases for emqx_pool module
2018-09-18 09:15:46 +08:00
spring2maz 35d209f364 Fix travis build 2018-09-14 00:52:03 +08:00
spring2maz 0c39a7620e Rebar3 and erlang.mk dual support. (#1806)
* Rebar3 and erlang.mk dual support.

There was only erlang.mk support prior to this change.
The main reasons for this dual support are:
* Cover report upload can only be done by rebar3 in travis.ci
* We want to prepare for the future to build emqx releases using rebar3
* We do not want to stop supporting erlang.mk in one single step

* Add depencency version consistency check between erlang.mk and rebar.config
2018-09-09 21:51:42 +08:00
周子博 08bab7efa4 Fix bugs in test cases 2018-09-08 11:49:20 +08:00
spring2maz 3a94d7ddae Generate a config file for testing
Prior to this change, the template file etc/emqx.conf is used
directly in testing, as a result, mustache style directories
are created e.g. `{{ platform_log_dir }}` which should have been
replaced with a config varialbe e.g. `log`

In this change, Makefile targets are added as `ct` dependency
to download bbmustach, load the template input, replace with
variableds defined in 'vars' file, finally to etc/gen.emqx.conf.
The direct usage of etc/emqx.conf in test code are replaced with
gen.emqx.conf
2018-09-07 07:04:04 +02:00
Feng Lee 5774ba542c Rename the emqx_mqtt_properties SUITE to emqx_mqtt_props 2018-09-06 18:10:01 +08:00
Feng Lee a4efcb5b2c Update Makefile and README.md 2018-08-31 01:08:01 +08:00
Gilbert Wong 487fa6824d add emqx_protocol test suites 2018-08-31 00:42:55 +08:00
Gilbert Wong a7274b115d ignore dup cases 2018-08-31 00:15:45 +08:00
Feng Lee 674b55e6e7
Merge pull request #1773 from tigercl/emqx30
Add emqx_banned test suite, and fix bugs in emqx_banned
2018-08-30 23:35:15 +08:00
周子博 83e11b6e39 Add emqx_banned test suite, and fix bugs in emqx_banned 2018-08-30 22:45:08 +08:00
Gilbert Wong d0eaa51928 add emqx listeners suite 2018-08-30 22:16:31 +08:00
周子博 e6d0329663 Fix test suites bug, and add emqx_message ct to Makefile 2018-08-30 19:55:44 +08:00
周子博 69b285aa3f Add test case for emqx_connection:attrs/1 2018-08-30 16:26:04 +08:00
周子博 c89f53f14d Add session, mountpoint test suites 2018-08-30 14:43:14 +08:00
Feng Lee 649f59d4dc Comment 'TEST_DEPS = emqx_ct_helplers' 2018-08-30 00:22:47 +08:00
Gilbert Wong 84f241522f update frame suite and frame suite 2018-08-29 14:36:40 +08:00
terry-xiaoyu c0fb5f3186 update gen_rpc 2018-08-27 19:28:54 +08:00
turtled 91eb79967c Add syslog 2018-08-27 13:50:38 +08:00
HuangDan e3fb147594 Fixed test case compilation error 2018-08-26 22:25:54 +08:00
Feng Lee 09b5535260 Depends on cowboy 2.4.0 2018-08-09 15:17:42 +08:00
turtled 4d9e03a803 Refactor websocket conn using cowboy 2018-08-08 18:36:14 +08:00
Feng Lee 1735786ffb Remove pbkdf2 lager_syslog bcrypt deps 2018-07-18 23:30:16 +08:00
Feng Lee b110a154ef Upgrade header files for EMQ X 3.0 2018-07-18 14:27:11 +08:00
Feng Lee 1de94b6858 Register the default ACL module in emqx_access_control 2018-06-21 22:40:30 +08:00
Feng Lee 22350f9117 Depends on canel-lock library 2018-03-09 13:26:46 +08:00
Feng Lee b144363f1e Depends on jsx 2.9.0 and gproc 0.7.0 2018-03-03 09:07:45 +08:00
Feng Lee fcb2ec8427 Merge the latest enterprise branch 2018-02-24 15:56:32 +08:00
Feng Lee b63c34ab14 Merge the latest master branch 2018-02-24 11:27:09 +08:00
Feng Lee 06b8db1967
Merge branch 'emq24' into develop 2018-02-01 12:20:43 +08:00
Feng Lee 0dac7a2708 Version 2.3.5 - depends on the 'develop' branch of esockd, ekka and mochiweb 2018-02-01 12:18:49 +08:00
Feng Lee 4727acad14 Depends on esockd v5.2.1, mochiweb v4.2.2 2018-02-01 12:13:46 +08:00
Feng Lee b9dcccd7f7 Version 2.3.4 2018-01-23 15:20:35 +08:00
Feng Lee fde905d754
Merge branch 'emq24' into develop 2018-01-07 12:53:30 +08:00
Feng Lee 953a7628a3 Version 2.3.3 2017-12-28 11:34:29 +08:00
Feng Lee 6d2483d6c0 Merge develop branch to emq24 2017-12-26 22:17:38 +08:00
Feng Lee 013cc9705e Depends on ekka v0.2.1 2017-12-26 22:15:09 +08:00
Feng Lee bcec25092b Merge version 2.3.2 to X edition 2017-12-26 21:09:24 +08:00
HuangDan 5aef79b1ad Fixed Conflicting files 2017-12-26 00:44:45 +08:00
HuangDan d7e56fa971 Upgrade the esockd library to v5.2 2017-12-25 17:31:23 +08:00
Feng Lee 6e5134a8b2 Merge with the enterprise edition 2017-12-07 16:24:48 +08:00
Feng Lee f1640f5b85 Merge emq24 to X branch 2017-12-07 11:02:44 +08:00
HuangDan ceafaad6b7 Update deps branch 2017-12-06 21:22:36 +08:00
HuangDan 921dba4eb4 Merge branch 'develop' into emq24 2017-12-06 21:20:30 +08:00
Feng Lee 0ba8d3e11d Depends on develop branch of esockd and mochiweb 2017-12-06 20:13:27 +08:00
huangdan b5c063f3cb
Merge pull request #1379 from emqtt/develop
Version 2.3.2
2017-12-06 15:52:55 +08:00
HuangDan 4c52d99706 Fixed test cases for emqttd_router_SUITE 2017-12-06 15:47:46 +08:00
Feng Lee c3c5589452 Version 2.3.2 2017-12-06 10:01:42 +08:00
huangdan e3161619c6
Merge pull request #1367 from emqtt/develop
Version 2.3.1
2017-12-03 00:54:07 +08:00
HuangDan b8e0a4d5c4 Bump version to 2.3.1 2017-12-03 00:43:42 +08:00
Feng Lee 223f3d4da5 Remove RPC configurations 2017-11-22 16:44:00 +08:00
Feng Lee 38c33e9c8b Merge with emqx 2017-11-21 22:41:05 +08:00
Feng Lee 2cec86eba7 Merge with version 2.3.0 2017-11-21 14:14:12 +08:00
huangdan 6c5d2e7d69
Merge pull request #1325 from emqtt/develop
Version 2.3.0
2017-11-19 00:55:59 -06:00
HuangDan 2d92f95294 Update the test cases for emqttd 2017-11-19 12:06:55 +08:00
Feng Lee 62d4f9f031 Bump version to 2.3.0 2017-11-17 20:53:07 +08:00
Feng Lee 4b8cd18f5d Merge with EMQ X project 2017-10-09 19:43:06 +08:00
Feng Lee e1816a5682 Remove rebar.config to fix the building error of CI 2017-08-28 17:31:38 +08:00
Feng Lee b5f741391b Add 'make autopatch' to fix the building error of travis CI 2017-08-28 15:01:50 +08:00
Feng Lee 12fb31f2f6 Merge pull request #1208 from getong/add_erlang_20
add erlang 20
2017-08-23 10:03:06 +08:00
huangdan 0a1ad99c88 Merge pull request #1214 from emqtt/emq24
Version 2.3-beta.3
2017-08-21 16:49:17 +08:00
HuangDan 75c6348cf5 Added more test cases for hot configuration 2017-08-16 03:07:30 +08:00
HuangDan 0f54613c11 Fix Conflicting files 2017-08-12 22:33:24 +08:00
HuangDan 8cb07b6299 Update Depends of clique 2017-08-11 17:15:53 +08:00
turtled 701ee3e8dc Add CLI set/get env 2017-08-10 18:19:20 +08:00
Feng Lee ffebce5090 Depend on develop branch of ekka 2017-07-26 13:58:44 +08:00
Feng Lee 74145cf5df Depends on master branch of ekka library 2017-07-23 18:55:21 +08:00
Feng Lee 263a553c50 Depends on emq24 branch of ekka library 2017-07-23 18:53:43 +08:00
Feng Lee 0a7ca2cdb3 Depends on ekka 0.2 develop branch 2017-07-18 18:37:52 +08:00
turtleDeng 523dd9c8b0 Merge pull request #1145 from emqtt/master
Merge emq22
2017-07-10 13:07:32 +08:00
huangdan f0fc53b9fe Merge pull request #1142 from emqtt/emq22
Version 2.2.0
2017-07-08 14:54:39 +08:00
HuangDan f9cf00804f Add dialyze dependencies 2017-07-06 15:54:03 +08:00
Feng Lee 9b646d8cbc Integrage with 'ekka' library 2017-06-16 12:30:09 +08:00
Feng Lee 44565a3de1 Version 2.3 2017-06-15 16:43:07 +08:00
huangdan 0067090d6a Merge pull request #1101 from emqtt/emq22
Version 2.2-rc.1
2017-06-13 22:21:16 +08:00
huangdan 034f39e811 Add ‘Compiled with option debug_info’ 2017-06-05 10:38:48 +08:00