Skip to content

Commit

Permalink
Added release notes; Removed permission-based integ test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-bdufour committed Sep 18, 2024
1 parent 0aa38c0 commit e92d48b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 62 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* Fixed SQL error when running `snow app version create` and `snow app version drop` with a version name that isn't a valid Snowflake unquoted identifier
* Duplicated keys in `snowflake.yml` are now detected and reported.
* `snow streamlit deploy` will check for existing streamlit instance before deploying anything.
* `snow app` commands don't enforce ownership of the objects they manage, and rely on RBAC instead.

# v2.8.1
## Backward incompatibility
Expand Down
62 changes: 0 additions & 62 deletions tests_integration/nativeapp/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,68 +69,6 @@ def test_nativeapp_version_create_and_drop(
assert len(actual.json) == 0


@pytest.mark.integration
@pytest.mark.parametrize(
"test_project",
[
"napp_init_v1",
"napp_init_v2",
],
)
def test_nativeapp_version_drop_from_non_owner_role(
runner,
snowflake_session,
default_username,
resource_suffix,
nativeapp_project_directory,
test_role,
test_project,
):
project_name = "myapp"
with nativeapp_project_directory(test_project):
result_create = runner.invoke_with_connection_json(["app", "deploy"])
assert result_create.exit_code == 0

package_name = f"{project_name}_pkg_{default_username}{resource_suffix}".upper()
# package exist
assert contains_row_with(
row_from_snowflake_session(
snowflake_session.execute_string(
f"show application packages like '{package_name}'",
)
),
dict(name=package_name),
)

result_grant = runner.invoke_with_connection_json(
[
"sql",
"-q",
f"grant manage versions on application package {package_name} to role {test_role}",
]
)
assert result_grant.exit_code == 0

result_create = runner.invoke_with_connection_json(
["app", "version", "create", "v1", "--force", "--skip-git-check"]
)
assert result_create.exit_code == 0

# app package contains version v1
expect = snowflake_session.execute_string(
f"show versions in application package {package_name}"
)
actual = runner.invoke_with_connection_json(["app", "version", "list"])
assert actual.json == row_from_snowflake_session(expect)

result_drop = runner.invoke_with_connection_json(
["app", "version", "drop", "v1", "--force", "--role", test_role]
)
assert result_drop.exit_code == 0
actual = runner.invoke_with_connection_json(["app", "version", "list"])
assert len(actual.json) == 0


# Tests upgrading an app from an existing loose files installation to versioned installation.
@pytest.mark.integration
@pytest.mark.parametrize(
Expand Down

0 comments on commit e92d48b

Please sign in to comment.