-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for unsupported directories
This adds tests for unsupported directories ( directories which are either named '', or '.' or '..', or have '//', '/./', '/../' in their total path in their bucket.
- Loading branch information
1 parent
ef0b1fe
commit 02488f1
Showing
3 changed files
with
71 additions
and
4 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
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
24 changes: 24 additions & 0 deletions
24
...tup/implicit_and_explicit_dir_setup/testdata/create_objects_in_unsupported_directories.sh
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,24 @@ | ||
# Copyright 2023 Google Inc. All Rights Reserved. | ||
# | ||
# 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. | ||
|
||
# Here $1 refers to the testBucket/testdir argument | ||
echo "This is from directory .. file fileInUnsupportedImplicitDir1" > fileInUnsupportedImplicitDir1 | ||
# bucket/testdir/../fileInImplicitDir1 | ||
gcloud storage cp fileInUnsupportedImplicitDir1 gs://$1/../ | ||
echo "This is from directory . file fileInUnsupportedImplicitDir2" > fileInUnsupportedImplicitDir2 | ||
# bucket/testdir/./fileInImplicitDir2 | ||
gcloud storage cp fileInUnsupportedImplicitDir2 gs://$1/./ | ||
echo "This is from directory \"\" file fileInUnsupportedImplicitDir3" > fileInUnsupportedImplicitDir3 | ||
# bucket/testdir//fileInImplicitDir3 | ||
gcloud storage cp fileInUnsupportedImplicitDir3 gs://$1//fileInUnsupportedImplicitDir3 |