Skip to content

Add integration tests for xDS flow control #100

Add integration tests for xDS flow control

Add integration tests for xDS flow control #100

#name: Message gray integration test
#env:
# sermantVersion: 1.0.0
#on:
# push:
# pull_request:
# branches:
# - '*'
# paths:
# - 'sermant-agentcore/**'
# - 'sermant-integration-tests/mq-grayscale-rocketmq-test/**'
# - 'sermant-plugins/sermant-mq-grayscale/**'
# - '.github/workflows/message_gray_integration_test.yml'
# - '.github/actions/common/mq-grayscale/rocketmq/**'
# - '.github/actions/scenarios/mq-grayscale/rocketmq/**'
# - '.github/actions/common/plugin-change-check/action.yml'
# - '.github/actions/common/entry/action.yml'
# - '.github/actions/common/exit/action.yml'
#concurrency:
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }}
# cancel-in-progress: true
#jobs:
# set-execution-conditions:
# name: set-execution-conditions
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: plugin-change-check
# id: plugin-change-check
# uses: ./.github/actions/common/plugin-change-check
# - name: set-outputs
# id: set-outputs
# run: |
# echo "enableMqGrayscaleRocketMqAction=${{env.enableMqGrayscaleRocketMqAction}}" >> $GITHUB_OUTPUT
# outputs:
# enableMqGrayscaleRocketMqAction: ${{ steps.set-outputs.outputs.enableMqGrayscaleRocketMqAction }}
# download-midwares-and-cache:
# name: download midwares and cache
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: cache local cse
# uses: actions/cache@v3
# with:
# path: Local-CSE-2.1.3-linux-amd64.zip
# key: ${{ runner.os }}-local-cse
# restore-keys: |
# ${{ runner.os }}-local-cse
# - name: download cse
# run: |
# export ROOT_PATH=$(pwd)
# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse
# - name: cache rocketmq
# uses: actions/cache@v3
# with:
# path: rocketmq-all-5.1.4-bin-release.zip
# key: ${{ runner.os }}-rocketmq-all-5.1.4-bin-release
# restore-keys: |
# ${{ runner.os }}-rocketmq-all-5.1.4-bin-release
# - name: download rocketmq
# run: |
# export ROOT_PATH=$(pwd)
# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh rocketmq514
# build-agent-and-cache:
# name: build agent and cache
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up JDK 8
# uses: actions/setup-java@v3
# with:
# java-version: '8'
# distribution: 'adopt'
# cache: maven
# - name: cache agent
# uses: actions/cache@v3
# with:
# path: sermant-agent-*/
# key: ${{ runner.os }}-agent-${{ github.run_id }}
# - name: package agent
# run: |
# sed -i '/sermant-backend/d' pom.xml
# sed -i '/sermant-integration-tests/d' pom.xml
# sed -i '/sermant-injector/d' pom.xml
# sed -i '/sermant-flowcontrol/d' sermant-plugins/pom.xml
# sed -i '/sermant-database-write-prohibition/d' sermant-plugins/pom.xml
# sed -i '/sermant-spring-beans-deal/d' sermant-plugins/pom.xml
# sed -i '/sermant-service-removal/d' sermant-plugins/pom.xml
# sed -i '/sermant-service-visibility/d' sermant-plugins/pom.xml
# sed -i '/sermant-monitor/d' sermant-plugins/pom.xml
# sed -i '/sermant-mq-consume-prohibition/d' sermant-plugins/pom.xml
# sed -i '/sermant-springboot-registry/d' sermant-plugins/pom.xml
# sed -i '/sermant-service-registry/d' sermant-plugins/pom.xml
# sed -i '/sermant-dynamic-config/d' sermant-plugins/pom.xml
# sed -i '/sermant-router/d' sermant-plugins/pom.xml
# sed -i '/sermant-loadbalancer/d' sermant-plugins/pom.xml
# mvn package -DskipTests -Ptest --file pom.xml
# test-for-plugin-false:
# name: Test for grayscale rocketmq pull plugin false
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache]
# strategy:
# matrix:
# test-model: ['PLUGIN_ENABLED_FALSE']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq
# test-for-auto-only-base:
# name: Test for pull base only for auto rule
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache, test-for-plugin-false]
# strategy:
# matrix:
# test-model: ['AUTO_ONLY_BASE']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq
# test-for-auto-exc-only-base:
# name: Test for pull base only for auto exclude rule
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache, test-for-auto-only-base]
# strategy:
# matrix:
# test-model: ['AUTO_EXC_ONLY_BASE']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq
# test-for-auto-base-gray:
# name: Test for pull base gray for auto rule
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache, test-for-auto-exc-only-base]
# strategy:
# matrix:
# test-model: ['AUTO_BASE_GRAY_PULL']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq
# test-for-auto-base-gray-lite:
# name: Test for pull base gray for auto rule
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache, test-for-auto-exc-only-base]
# strategy:
# matrix:
# test-model: ['AUTO_BASE_GRAY_LITE_PULL']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq
# test-for-auto-base-gray-push:
# name: Test for pull base gray for auto rule
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache, test-for-auto-exc-only-base]
# strategy:
# matrix:
# test-model: ['AUTO_BASE_GRAY_PUSH']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq
# test-for-auto-exc-base-gray:
# name: Test for pull base gray for auto exclude rule
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache, test-for-auto-base-gray]
# strategy:
# matrix:
# test-model: ['AUTO_EXC_BASE_GRAY']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq
# test-for-base-only-base:
# name: Test for pull base only for base rule
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache, test-for-auto-exc-base-gray]
# strategy:
# matrix:
# test-model: ['BASE_ONLY_BASE']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq
# test-for-base-exc-only-base:
# name: Test for pull base only for base exclude rule
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache, test-for-base-only-base]
# strategy:
# matrix:
# test-model: ['BASE_EXC_ONLY_BASE']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq
# test-for-base-base-gray:
# name: Test for pull base gray for base rule
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache, test-for-base-exc-only-base]
# strategy:
# matrix:
# test-model: ['BASE_BASE_GRAY']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq
# test-for-base-exc-base-gray:
# name: Test for pull base gray for base exclude rule
# runs-on: ubuntu-latest
# if: needs.set-execution-conditions.outputs.enableMqGrayscaleRocketMqAction=='true'
# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache, test-for-base-base-gray]
# strategy:
# matrix:
# test-model: ['BASE_EXC_BASE_GRAY']
# rocketMqClientVersion: ["4.8.0", "4.9.8", "5.1.4", "5.2.0", "5.3.1"]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 100
# - name: set java version to environment
# run: |
# echo "javaVersion=8" >> $GITHUB_ENV
# - name: common operations
# uses: ./.github/actions/common/mq-grayscale/rocketmq
# - name: message gray test for test-model=${{ matrix.test-model }} rocketMqClientVersion=${{ matrix.rocketMqClientVersion }}
# uses: ./.github/actions/scenarios/mq-grayscale/rocketmq