-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set test config file mode to 600 to prevent warnings (#1398)
Prevents the warnings about file permissions in tests: ``` /home/runner/.local/share/hatch/env/virtual/snowflake-cli-labs/M-xJJ0Mq/integration/lib/python3.10/site-packages/snowflake/connector/config_manager.py:351: UserWarning: Bad owner or permissions on /home/runner/work/snowflake-cli/snowflake-cli/tests_integration/config/plugin_tests/override_plugin_config.toml. * To change owner, run `chown $USER "/home/runner/work/snowflake-cli/snowflake-cli/tests_integration/config/plugin_tests/override_plugin_config.toml"`. * To restrict permissions, run `chmod 0600 "/home/runner/work/snowflake-cli/snowflake-cli/tests_integration/config/plugin_tests/override_plugin_config.toml"`. warn(f"Bad owner or permissions on {str(filep)}{chmod_message}") ``` Since Git doesn't store file permissions (only the executable bit), the files get checked out as `644` so we need to remove group and public read access.
- Loading branch information
1 parent
ebee456
commit 948d5c7
Showing
4 changed files
with
30 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2024 Snowflake Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Same as connection_configs.toml but its mode bits | ||
# don't get set to 644 during tests (to test the warning mechanism) | ||
|
||
[connections.default] | ||
[connections.integration] | ||
schema = "public" | ||
role = "INTEGRATION_TESTS" |
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
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