RTECO-1411 Add agentplugins tests#3551
Open
udaykb2 wants to merge 11 commits into
Open
Conversation
21c5b58 to
7421e4c
Compare
116398c to
6c6c15c
Compare
6c6c15c to
793a61e
Compare
d9ef023 to
8c14733
Compare
5ab34f1 to
ff67c00
Compare
All similar tests are refactored together. Removed scanario number from comments
ff67c00 to
149ad0d
Compare
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

masterbranch.go vet ./....go fmt ./....Agent Plugins Test Coverage
Commands and Scenarios
publish
--versionflag: overrides the version declared inplugin.jsonplugin.json: returns a clear error when the manifest is absent<path>argument: returns a usage/validation errorzip/is uploaded as-is without re-zipping--signing-keyattaches evidence to the artifact--signing-keysucceeds; evidence step is skipped (not a failure)--build-name/--build-number): build info entry is created and retrievable from Artifactory--build-name/--build-numberdoes not create a build info entry--module): overrides the default module ID (slug) in the build info entryJFROG_BUILD_NAME/JFROG_BUILD_NUMBERare auto-collected even without explicit flagsinstall
<installPath>/<slug>/; uses--pathto bypass harness resolution--version): installs the exact requested version rather than latest--project-dir: installs into the project-relative harness directory--global: installs into the agent's global harness directory (e.g.~/.claude/plugins/<slug>)--path: installs directly into the given path, bypassing harness lookup--harness a,b): installs the plugin into all specified harness directories--harness=claudewithout--versionresolves version fromclaude-marketplace.json; fails if marketplace file absent;--versionbypasses marketplace entirelyagent-config.jsonoverride: custom agent entry underplugins-agentsis respected for--global(globalDir), explicit--project-dir, and default cwd (projectDir)plugin-info.jsonis written recording slug and installed versionJFROG_AGENT_PLUGINS_DISABLE_QUIET_FAILUREis setJFROG_AGENT_PLUGINS_DISABLE_QUIET_FAILURE=trueallows install to succeed even without evidence--format=json: install output is parseable JSON rather than human-readable tableupdate
--slug): updates a specific plugin to the newest available version--dry-run: shows what would be updated without changing any files--force: re-installs even when the installed version is already up-to-date--all: updates every installed plugin under a given harness--allnon-interactive (CI=true):update --allwithout--quietproceeds automatically whenCI=trueinstead of blocking on a confirmation prompt--allinvalid flag combinations:--all+--slugmutually exclusive;--all+--versionmutually exclusive; missing both--slugand--allfails--slugfor an uninstalled plugin returns a clear error--format=json(single slug): output is valid JSON--format=json(--all): output is valid JSON for all updated pluginsdelete
--dry-run): reports what would be deleted without removing any artifact--version: omitting--versionproduces a clear error rather than silently deleting all versionslist
--repo): lists available plugins in an Artifactory repo without error after a publish--harness): lists installed plugins after a local install--check-updates(--harness): flag is accepted and produces no error--format=jsonwith--repo: produces valid JSON output--limit: positive limit value is accepted--sort-by=updated: valid sort field accepted--sort-by=<unknown>: unknown sort field returns an error--sort-order=desc: accepted without error--sort-order=<unknown>: accepted without error (not validated by CLI)--check-updateswithout--harness: rejected with a clear error (--repoalone is unsupported)search
agentplugins.nameproperty--format=json: produces parseable JSON outputCross-command / round-trips
Configuration and connectivity
JFROG_AGENT_PLUGINS_REPO): used when--repois omitted--repoflag overrides env var--repoand the env var--server-idvalid: using a configured server ID succeeds--server-idunknown: unrecognised server ID returns a clear error before any network callHTTPS_PROXY): install and publish work when routed through a proxyNO_PROXY): proxy is bypassed when Artifactory host is inNO_PROXY--insecure-tls): install and publish work against an instance with a self-signed certificateChecksum
Misc / validation
--format: non-"json" format values are treated as table (not an error for list; format error for other commands)Test Name → Scenarios
--versionoverrides plugin.json versionzip/uploaded as-is without re-zipping--signing-keyattaches evidence to artifact--signing-keysucceeds; evidence step skipped--build-name/--build-number--build-namewithout--build-number(and vice versa) returns an error--moduleoverrides default module ID in build info--path--versioninstalls exact version--project-dirinstalls into project-relative harness dir--global --harness=claudeinstalls into~/.claude/plugins/<slug>--pathinstalls directly, bypassing harness lookup--path --version=1.0.0installs the specific version into the given dir--harnessinstalls into all specified dirs--globaland--project-dirtogether returns a clear error--harnessand--pathtogether returns a clear error--versionagent-config.jsonoverrides respected for--global,--project-dir, and default cwdplugin-info.jsonwritten after install recording slug and versionJFROG_AGENT_PLUGINS_DISABLE_QUIET_FAILURE=truebypasses evidence gate--format=jsonproduces parseable JSON install output--slugupdates specific plugin to newest version--dry-runreports changes without writing files--forcere-installs even when already up-to-date--allupdates every installed plugin for a harness--allwith empty harness dir succeeds with "nothing to update"--allwithout--quietauto-proceeds whenCI=true--format=jsonwith--slugand with--allboth produce valid JSON--slug/--all; mutually exclusive pairs (--all+--slug,--all+--version,--all+--path); invalid slug format; uninstalled slug--versionalways required--dry-runreports without deleting artifact--dry-runon multi-version plugin only targets specified version; others untouched--dry-runon a non-existent plugin returns a not-found error--versionreturns clear error instead of deleting all--repolists available plugins without error after publish--harnesslists installed plugins after local install--harness=claude,cursorsucceeds and produces output for each harness--check-updates --harnessaccepted and produces no error--check-updates --format=jsonreports status "behind" when v1 installed and v2 available--format,--limit,--sort-by,--sort-ordervalid/invalid;--check-updateswithout--harnessrejected--globaland--project-dirtogether returns a clear error--limittruncates results in--harnessmode--limit=0is rejected as invalid--check-updates --format=jsonreports status "current" when plugin is at latest versionagentplugins.namepropertyJFROG_AGENT_PLUGINS_REPOenv var used when--repoomitted--format=jsonproduces parseable JSON search outputJFROG_AGENT_PLUGINS_REPOused when--repoomitted--repoflag overrides env var--repoand env var--server-idwith known server ID succeeds--server-idwith unknown ID errors before any network callHTTPS_PROXYNO_PROXY--insecure-tlsallows publish against self-signed certTotal: 85 tests