Skip to content

Commit

Permalink
feat: add support-notification fuzzing test (#4744)
Browse files Browse the repository at this point in the history
* feat: add support-notification fuzzing test and update support-notifications.yaml file

closes: #4743
Signed-off-by: Valina Li <valina.li@intel.com>
  • Loading branch information
vli11 authored Jan 8, 2024
1 parent c8ac9d5 commit 8cfc94c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# SPDX-License-Identifier: Apache-2.0
#

.PHONY: build clean unittest hadolint lint test docker run sbom docker-fuzz fuzz-test-command fuzz-test-data
.PHONY: build clean unittest hadolint lint test docker run sbom docker-fuzz fuzz-test-command fuzz-test-data fuzz-test-notifications

# change the following boolean flag to include or exclude the delayed start libs for builds for most of core services except support services
INCLUDE_DELAYED_START_BUILD_CORE:="false"
Expand Down Expand Up @@ -377,4 +377,8 @@ fuzz-test-command:

fuzz-test-data:
# not joining the edgex-network due to swagger file url pointing to localhost for fuzz testing in the container
docker run --net host --rm -v "$$PWD/fuzz_test/fuzz_results:/fuzz_results" fuzz-edgex-go:latest core-data /restler-fuzzer/openapi/core-data.yaml
docker run --net host --rm -v "$$PWD/fuzz_test/fuzz_results:/fuzz_results" fuzz-edgex-go:latest core-data /restler-fuzzer/openapi/core-data.yaml

fuzz-test-notifications:
# not joining the edgex-network due to swagger file url pointing to localhost for fuzz testing in the container
docker run --net host --rm -v "$$PWD/fuzz_test/fuzz_results:/fuzz_results" fuzz-edgex-go:latest support-notifications /restler-fuzzer/openapi/support-notifications.yaml
7 changes: 7 additions & 0 deletions openapi/v3/support-notifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,7 @@ paths:
required: true
schema:
type: string
format: uuid
description: "The ID that identifies the notification."
get:
summary: "Returns a notification by ID."
Expand Down Expand Up @@ -1305,6 +1306,10 @@ paths:
required: true
schema:
type: string
enum:
- NEW
- PROCESSED
- ESCALATED
description: "The status of the notifications you wish to load."
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/limitParam'
Expand Down Expand Up @@ -1869,6 +1874,7 @@ paths:
required: true
schema:
type: string
format: uuid
description: "The ID that identifies the transmission."
get:
summary: "Returns a transmission by ID."
Expand Down Expand Up @@ -2213,6 +2219,7 @@ paths:
required: true
schema:
type: string
format: uuid
description: "The notification id associated with transmissions you wish to load."
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/limitParam'
Expand Down

0 comments on commit 8cfc94c

Please sign in to comment.