From 149e86d0508a3d15f15607455677178b8b6ed755 Mon Sep 17 00:00:00 2001 From: gadotroee <55343099+gadotroee@users.noreply.github.com> Date: Tue, 19 Apr 2022 08:51:32 +0300 Subject: [PATCH] Run unit tests when tap/api changes (#1016) * update test files paths --- .github/workflows/test.yml | 3 +-- tap/api/api.go | 2 +- tap/extensions/amqp/Makefile | 2 +- tap/extensions/http/Makefile | 2 +- tap/extensions/kafka/Makefile | 2 +- tap/extensions/redis/Makefile | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2156afa32..7abf91fa2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,7 +56,7 @@ jobs: - name: Check extensions modified files id: ext_modified_files - run: devops/check_modified_files.sh tap/extensions/ + run: devops/check_modified_files.sh tap/extensions/ tap/api/ - name: Extensions Test if: github.event_name == 'push' || steps.ext_modified_files.outputs.matched == 'true' @@ -64,4 +64,3 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 - diff --git a/tap/api/api.go b/tap/api/api.go index a7407e0c6..125b33680 100644 --- a/tap/api/api.go +++ b/tap/api/api.go @@ -93,8 +93,8 @@ type RequestResponsePair struct { Response GenericMessage `json:"response"` } -// `Protocol` is modified in the later stages of data propagation. Therefore it's not a pointer. type OutputChannelItem struct { + // `Protocol` is modified in later stages of data propagation. Therefore, it's not a pointer. Protocol Protocol Capture Capture Timestamp int64 diff --git a/tap/extensions/amqp/Makefile b/tap/extensions/amqp/Makefile index 2783b8176..884c30d83 100644 --- a/tap/extensions/amqp/Makefile +++ b/tap/extensions/amqp/Makefile @@ -13,4 +13,4 @@ test-pull-bin: test-pull-expect: @mkdir -p expect - @[ "${skipexpect}" ] && echo "Skipping downloading expected JSONs" || gsutil -o 'GSUtil:parallel_process_count=5' -o 'GSUtil:parallel_thread_count=5' -m cp -r gs://static.up9.io/mizu/test-pcap/expect7/amqp/\* expect + @[ "${skipexpect}" ] && echo "Skipping downloading expected JSONs" || gsutil -o 'GSUtil:parallel_process_count=5' -o 'GSUtil:parallel_thread_count=5' -m cp -r gs://static.up9.io/mizu/test-pcap/expect8/amqp/\* expect diff --git a/tap/extensions/http/Makefile b/tap/extensions/http/Makefile index 74519214c..1bdbf379b 100644 --- a/tap/extensions/http/Makefile +++ b/tap/extensions/http/Makefile @@ -13,4 +13,4 @@ test-pull-bin: test-pull-expect: @mkdir -p expect - @[ "${skipexpect}" ] && echo "Skipping downloading expected JSONs" || gsutil -o 'GSUtil:parallel_process_count=5' -o 'GSUtil:parallel_thread_count=5' -m cp -r gs://static.up9.io/mizu/test-pcap/expect7/http/\* expect + @[ "${skipexpect}" ] && echo "Skipping downloading expected JSONs" || gsutil -o 'GSUtil:parallel_process_count=5' -o 'GSUtil:parallel_thread_count=5' -m cp -r gs://static.up9.io/mizu/test-pcap/expect8/http/\* expect diff --git a/tap/extensions/kafka/Makefile b/tap/extensions/kafka/Makefile index 2e9ebc5c8..a7774b084 100644 --- a/tap/extensions/kafka/Makefile +++ b/tap/extensions/kafka/Makefile @@ -13,4 +13,4 @@ test-pull-bin: test-pull-expect: @mkdir -p expect - @[ "${skipexpect}" ] && echo "Skipping downloading expected JSONs" || gsutil -o 'GSUtil:parallel_process_count=5' -o 'GSUtil:parallel_thread_count=5' -m cp -r gs://static.up9.io/mizu/test-pcap/expect7/kafka/\* expect + @[ "${skipexpect}" ] && echo "Skipping downloading expected JSONs" || gsutil -o 'GSUtil:parallel_process_count=5' -o 'GSUtil:parallel_thread_count=5' -m cp -r gs://static.up9.io/mizu/test-pcap/expect8/kafka/\* expect diff --git a/tap/extensions/redis/Makefile b/tap/extensions/redis/Makefile index e943d359a..9ce8c79e0 100644 --- a/tap/extensions/redis/Makefile +++ b/tap/extensions/redis/Makefile @@ -13,4 +13,4 @@ test-pull-bin: test-pull-expect: @mkdir -p expect - @[ "${skipexpect}" ] && echo "Skipping downloading expected JSONs" || gsutil -o 'GSUtil:parallel_process_count=5' -o 'GSUtil:parallel_thread_count=5' -m cp -r gs://static.up9.io/mizu/test-pcap/expect7/redis/\* expect + @[ "${skipexpect}" ] && echo "Skipping downloading expected JSONs" || gsutil -o 'GSUtil:parallel_process_count=5' -o 'GSUtil:parallel_thread_count=5' -m cp -r gs://static.up9.io/mizu/test-pcap/expect8/redis/\* expect