Browse Source

test(CI): delete matrix for test case

zhanghongtong 5 years ago
parent
commit
fcf6743173

+ 3 - 3
.ci/apps_tests/.env

@@ -1,5 +1,5 @@
-MYSQL_TAG=5.7
+MYSQL_TAG=8
 REDIS_TAG=6
-MONGO_TAG=4.1
-PGSQL_TAG=11
+MONGO_TAG=4
+PGSQL_TAG=13
 LDAP_TAG=2.4.50

+ 0 - 17
.ci/apps_tests/docker-compose.yaml

@@ -26,10 +26,6 @@ services:
     environment:
       MYSQL_ROOT_PASSWORD: public
       MYSQL_DATABASE: mqtt
-    volumes:
-      - ../../apps/emqx_auth_mysql/test/emqx_auth_mysql_SUITE_data/ca.pem:/etc/certs/ca-cert.pem
-      - ../../apps/emqx_auth_mysql/test/emqx_auth_mysql_SUITE_data/server-cert.pem:/etc/certs/server-cert.pem
-      - ../../apps/emqx_auth_mysql/test/emqx_auth_mysql_SUITE_data/server-key.pem:/etc/certs/server-key.pem
     command:
       --bind-address 0.0.0.0
       --default-authentication-plugin=mysql_native_password
@@ -39,9 +35,6 @@ services:
       --lower_case_table_names=1
       --max_allowed_packet=128M
       --skip-symbolic-links
-      --ssl-ca=/etc/certs/ca.pem
-      --ssl-cert=/etc/certs/server-cert.pem
-      --ssl-key=/etc/certs/server-key.pem
     networks:
       - emqx_bridge
 
@@ -53,12 +46,6 @@ services:
     command:
       - redis-server
       - "--bind 0.0.0.0 ::"
-      - --tls-port 6380
-      - --tls-cert-file /tls/redis.crt
-      - --tls-key-file /tls/redis.key
-      - --tls-ca-cert-file /tls/ca.crt
-    volumes:
-      - ../../apps/emqx_auth_redis/test/emqx_auth_redis_SUITE_data/certs:/tls
     restart: always
     networks:
       - emqx_bridge
@@ -71,13 +58,9 @@ services:
     restart: always
     environment:
       MONGO_INITDB_DATABASE: mqtt
-    volumes:
-        - ../../apps/emqx_auth_mongo/test/emqx_auth_mongo_SUITE_data/mongodb.pem/:/etc/certs/mongodb.pem
     command:
       --ipv6
       --bind_ip_all
-      --sslMode requireSSL
-      --sslPEMKeyFile /etc/certs/mongodb.pem
     networks:
       - emqx_bridge
 

+ 21 - 0
.ci/compatibility_tests/pgsql/pg.conf

@@ -0,0 +1,21 @@
+# - Connection Settings -
+
+listen_addresses = '*'
+port = 5432				# (change requires restart)
+max_connections = 100			# (change requires restart)
+# - SSL -
+
+ssl = on
+ssl_cert_file = '/etc/postgresql/server-cert.pem'
+ssl_key_file = '/etc/postgresql/server-key.pem'
+shared_buffers = 128MB			# min 128kB
+checkpoint_timeout = 5min		# range 30s-1d
+max_wal_size = 1GB
+min_wal_size = 80MB
+datestyle = 'iso, mdy'
+timezone = 'Etc/UTC'
+lc_messages = 'en_US.utf8'			# locale for system error message
+lc_monetary = 'en_US.utf8'			# locale for monetary formatting
+lc_numeric = 'en_US.utf8'			# locale for number formatting
+lc_time = 'en_US.utf8'				# locale for time formatting
+default_text_search_config = 'pg_catalog.english'

+ 1 - 1
.github/workflows/elvis_lint.yaml

@@ -4,7 +4,7 @@ on: [pull_request]
 
 jobs:
   build:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     steps:
       - uses: actions/checkout@v1
       - run: |

+ 1 - 1
.github/workflows/run_gitlint.yaml

@@ -4,7 +4,7 @@ on: [pull_request]
 
 jobs:
   run_gitlint:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     steps:
       - name: Checkout source code
         uses: actions/checkout@master

+ 8 - 31
.github/workflows/run_test_cases.yaml

@@ -14,25 +14,17 @@ on:
 
 jobs:
     run_test_case:
-        runs-on: ubuntu-latest
-
-        strategy:
-          matrix:
-            mysql_tag: [5.7]
-            redis_tag: [6]
-            mongo_tag: [4]
-            pgsql_tag: [13]
-            ldap_tag: [2.4.50]
+        runs-on: ubuntu-20.04
 
         steps:
         - uses: actions/checkout@v2
         - name: set up
           env:
-            MYSQL_TAG: ${{ matrix.mysql_tag }}
-            REDIS_TAG: ${{ matrix.redis_tag }}
-            MONGO_TAG: ${{ matrix.mongo_tag }}
-            PGSQL_TAG: ${{ matrix.pgsql_tag }}
-            LDAP_TAG: ${{ matrix.ldap_tag }}
+            MYSQL_TAG: 8
+            REDIS_TAG: 6
+            MONGO_TAG: 4
+            PGSQL_TAG: 13
+            LDAP_TAG: 2.4.50
           run: |
             cp -f apps/emqx_auth_ldap/emqx.io.ldif .ci/apps_tests/emqx_ldap/schema
             cp -f apps/emqx_auth_ldap/emqx.schema  .ci/apps_tests/emqx_ldap/schema
@@ -42,23 +34,8 @@ jobs:
         - name: set config files
           run: |
             sed -i "/auth.mysql.server/c auth.mysql.server = mysql_server:3306" apps/emqx_auth_mysql/etc/emqx_auth_mysql.conf
-            echo 'auth.mysql.ssl = on' >> apps/emqx_auth_redis/etc/emqx_auth_mysql.conf
-            echo "auth.mysql.ssl.cafile = /emqx/apps/emqx_auth_mysql/test/emqx_auth_mysql_SUITE_data/ca.pem" >> apps/emqx_auth_mysql/etc/emqx_auth_mysql.conf
-            echo "auth.mysql.ssl.certfile = /emqx/apps/emqx_auth_mysql/test/emqx_auth_mysql_SUITE_data/client-cert.pem" >> apps/emqx_auth_mysql/etc/emqx_auth_mysql.conf
-            echo "auth.mysql.ssl.keyfile =  /emqx/apps/emqx_auth_mysql/test/emqx_auth_mysql_SUITE_data/client-key.pem" >> apps/emqx_auth_mysql/etc/emqx_auth_mysql.conf
-
             sed -i "/auth.redis.server/c auth.redis.server = redis_server:6379" apps/emqx_auth_redis/etc/emqx_auth_redis.conf
-            echo 'auth.redis.ssl = on' >> apps/emqx_auth_redis/etc/emqx_auth_redis.conf
-            echo 'auth.redis.ssl.cafile = /emqx/apps/emqx_auth_redis/test/emqx_auth_redis_SUITE_data/certs/ca.crt' >> apps/emqx_auth_redis/etc/emqx_auth_redis.conf
-            echo 'auth.redis.ssl.certfile = /emqx/apps/emqx_auth_redis/test/emqx_auth_redis_SUITE_data/certs/redis.crt' >> apps/emqx_auth_redis/etc/emqx_auth_redis.conf
-            echo 'auth.redis.ssl.keyfile = /emqx/apps/emqx_auth_redis/test/emqx_auth_redis_SUITE_data/certs/redis.key' >> apps/emqx_auth_redis/etc/emqx_auth_redis.conf
-
             sed -i "/auth.mongo.server/c auth.mongo.server = mongo_server:27017" apps/emqx_auth_mongo/etc/emqx_auth_mongo.conf
-            echo 'auth.mongo.ssl = on' >> apps/emqx_auth_mongo/etc/emqx_auth_mongo.conf
-            echo 'auth.mongo.ssl.cacertfile = /emqx/apps/emqx_auth_mongo/test/emqx_auth_mongo_SUITE_data/ca.pem' >> apps/emqx_auth_mongo/etc/emqx_auth_mongo.conf
-            echo 'auth.mongo.ssl.certfile = /emqx/apps/emqx_auth_mongo/test/emqx_auth_mongo_SUITE_data/client-cert.pem' >> apps/emqx_auth_mongo/etc/emqx_auth_mongo.conf
-            echo 'auth.mongo.ssl.keyfile = /emqx/apps/emqx_auth_mongo/test/emqx_auth_mongo_SUITE_data/client-key.pem' >> apps/emqx_auth_mongo/etc/emqx_auth_mongo.conf
-
             sed -i "/auth.pgsql.server/c auth.pgsql.server = pgsql_server:5432" apps/emqx_auth_pgsql/etc/emqx_auth_pgsql.conf
             sed -i "/auth.ldap.servers/c auth.ldap.servers = ldap_server" apps/emqx_auth_ldap/etc/emqx_auth_ldap.conf
         - name: run tests
@@ -68,9 +45,9 @@ jobs:
         - uses: actions/upload-artifact@v1
           if: failure()
           with:
-            name: logs_mysql${{ matrix.mysql_tag }}_reids${{ matrix.redis_tag }}_mongo${{ matrix.mongo_tag }}_pgsql${{ matrix.pgsql_tag }}_ldap${{ matrix.ldap_tag }}
+            name: logs
             path: _build/test/logs
         - uses: actions/upload-artifact@v1
           with:
-            name: cover_mysql${{ matrix.mysql_tag }}_reids${{ matrix.redis_tag }}_mongo${{ matrix.mongo_tag }}_pgsql${{ matrix.pgsql_tag }}_ldap${{ matrix.ldap_tag }}
+            name: cover
             path: _build/test/cover