Skip to content

Commit

Permalink
SNOW-1706990 Convert test_manager.py to use v2 entities (#1722)
Browse files Browse the repository at this point in the history
Updates tests in `test_manager.py` to use a v2 test project and call out to the v2 entities directly instead of going through the `NativeAppManager`. I've kept the diff as simple as possible and avoided introducing too many helpers or reorganizing the code, that can be done separately if necessary (the top priority is to just work towards removing `NativeAppManager` and all these static methods first).
  • Loading branch information
sfc-gh-fcampbell authored Oct 15, 2024
1 parent cc9cba5 commit 35e4242
Show file tree
Hide file tree
Showing 11 changed files with 434 additions and 155 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,13 @@ def action_drop(self, action_ctx: ActionContext, force_drop: bool, *args, **kwar
)

def action_validate(
self, action_ctx: ActionContext, interactive: bool, force: bool, *args, **kwargs
self,
action_ctx: ActionContext,
interactive: bool,
force: bool,
use_scratch_stage: bool = True,
*args,
**kwargs,
):
model = self._entity_model
workspace_ctx = self._workspace_ctx
Expand Down Expand Up @@ -266,7 +272,7 @@ def action_validate(
post_deploy_hooks=model.meta and model.meta.post_deploy,
package_scripts=[], # Package scripts are not supported in PDFv2
policy=policy,
use_scratch_stage=True,
use_scratch_stage=use_scratch_stage,
scratch_stage_fqn=f"{package_name}.{model.scratch_stage}",
)
workspace_ctx.console.message("Setup script is valid")
Expand Down
Loading

0 comments on commit 35e4242

Please sign in to comment.