Skip to content

test: add activate fuzz coverage#1371

Draft
ShradhaGupta31 wants to merge 1 commit into
mainfrom
fuzz-test-activation
Draft

test: add activate fuzz coverage#1371
ShradhaGupta31 wants to merge 1 commit into
mainfrom
fuzz-test-activation

Conversation

@ShradhaGupta31
Copy link
Copy Markdown
Contributor

  • add fuzz targets for activate command
  • updated makefile & fuzz.yml to include activate fuzz test
  • updated cli file to include activate fuzz targets in GitHub Actions fuzz workflow

addresses - #1351

- add fuzz targets for activate command
- updated makefile & fuzz.yml to include activate fuzz test
- updated cli file to include activate fuzz targets in GitHub Actions fuzz workflow

Signed-off-by: ShradhaGupta31 <shradha.gupta@intel.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Go fuzz-test coverage for the activate CLI command and wires the new fuzz targets into existing local (make fuzz*) and GitHub Actions fuzz workflows, following the established pattern used for deactivate.

Changes:

  • Added new fuzz targets covering activate command parsing/validation (flags, URL, profile, password, and combinations).
  • Updated makefile fuzz targets (fuzz, fuzz-short, fuzz-regression) to run the new activate fuzz tests.
  • Updated .github/workflows/fuzz.yml to include the new fuzz targets in both the manual-duration and regression fuzz jobs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
makefile Runs new activate fuzz targets in existing fuzz make targets.
internal/cli/cli_fuzz_test.go Adds fuzz tests for activate command inputs and flag combinations.
.github/workflows/fuzz.yml Runs the new activate fuzz targets in the CI fuzz workflows.

Comment on lines +361 to +364
defer recoverPanic(t, flags)

_, _, err := Parse(args, mockAMTCommand)
_ = err
Comment on lines +403 to +406
defer recoverPanic(t, url)

_, _, err := Parse(args, mockAMTCommand)
_ = err
Comment on lines +440 to +443
defer recoverPanic(t, profile)

_, _, err := Parse(args, mockAMTCommand)
_ = err
Comment on lines +484 to +487
defer recoverPanic(t, password)

_, _, err := Parse(args, mockAMTCommand)
_ = err
Comment on lines +583 to +586
defer recoverPanic(t, strings.Join(args, " "))

_, _, err := Parse(args, mockAMTCommand)
_ = err
Comment on lines +356 to +359
args := []string{"rpc", "activate"}
if trimmed := strings.TrimSpace(flags); trimmed != "" {
args = append(args, strings.Fields(flags)...)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants