apache / apache/openwhisk-wskdeploy

Test if action, trigger or rule already exists before deployment

Open
#616 0 comments 0 reactions 0 assignees View on GitHub
enhancement question
Dominant language
Go
Stars
75
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Can we in unit/integration tests have a convention some functional code that between tests cases being run (or by default at the top of each unit test) for namespace conflicts? That is, can we look at the test about to be run,

For example, I see us leveraging the all the YAML files in each unit test (and move away from hardcoded strings) where we have a standard function that
- parses the manifest YAML
- creates a std. structure containing information about the YAML file including:
- number of actions in YAML
- number of parameters in each Action (both input and output)
- assures that each Package/Action/Trigger/Rule name within the YAML is unique (no intra-file cut/paste errors)
- is able to (maybe not by default) iterate over the action, trigger and rule names and is able to WARN if the names already exist in the namespace.

Of course, we would want to leverage the code to test if action/trigger/rule already exists for the command line to allow user to see where they are/will overwrite existing code.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the unit and integration tests and the YAML manifests they use, then trace how deployment and command-line handling currently process action, trigger, and rule names. Done should include a defined convention for detecting intra-file duplicates and warning about namespace conflicts in tests and the command line.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, yaml
Domain
cli, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.