-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly handle read-only files when cleaning up in `snow app list-t…
…emplates` (#1138)
- Loading branch information
1 parent
47f733a
commit 7a9d15f
Showing
3 changed files
with
17 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
26 changes: 0 additions & 26 deletions
26
tests_integration/nativeapp/__snapshots__/test_templates.ambr
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
import pytest | ||
from snowflake.connector.compat import IS_WINDOWS | ||
|
||
|
||
@pytest.mark.integration | ||
@pytest.mark.skipif(IS_WINDOWS, reason="Permissions issue on Windows") | ||
def test_list_templates_no_options_success(runner, snapshot): | ||
def test_list_templates_no_options_success(runner): | ||
args = ["app", "list-templates"] | ||
result = runner.invoke(args) | ||
result = runner.invoke_json(args) | ||
|
||
assert result.exit_code == 0 | ||
assert result.output == snapshot | ||
templates = result.json | ||
assert len(templates) > 0 | ||
|
||
# Check that the basic templates are present, but explicitly avoid checking for an | ||
# exact list so that adding new templates won't break the tests. | ||
all_template_names = [t["template"] for t in templates] | ||
assert "basic" in all_template_names | ||
assert "streamlit-java" in all_template_names | ||
assert "streamlit-python" in all_template_names |