Skip to content

Commit 4f6a4a8

Browse files
committed
license add in header
1 parent 96e7bb9 commit 4f6a4a8

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

tools/integration_tests/log_rotation/log_rotation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func TestMain(m *testing.M) {
113113
// 6. Override GKE specific paths with GCSFuse paths if running in GCE environment.
114114
overrideFilePathsInFlagSet(cfg, setup.TestDir())
115115

116-
flags := setup.BuildFlagSets(*cfg, bucketType)
116+
flags := setup.BuildFlagSets(*cfg, bucketType, "")
117117
setupLogFileDir(testDirName)
118118

119119
successCode := static_mounting.RunTestsWithConfigFile(cfg, flags, m)

tools/integration_tests/log_rotation/logrotate_logfile_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ func TestLogRotation(t *testing.T) {
141141
rotatedCompressedFileCtr++
142142
} else if !strings.HasSuffix(entry.Name(), ".stderr") {
143143
rotatedUncompressedFileCtr++
144+
validateLogFileSize(t, entry)
144145
}
145146
}
146147

tools/integration_tests/run_gke_tests.sh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
#!/bin/bash
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
215

316
CONFIG_FILE="test_config.yaml"
17+
GCSFUSE_BINARY="../../gcsfuse"
418
# UPDATED: Using 'interrupt' to match the package in the latest execution trace.
519
PACKAGE_NAME="log_rotation"
620
GO_TEST_DIR="./${PACKAGE_NAME}/..."
@@ -77,17 +91,18 @@ for (( i=0; i<$NUM_CONFIGS; i++ )); do
7791
echo "--- ${DISPLAY_NAME} (using flags: ${FLAGS}) ---"
7892

7993
# MOCK MOUNT (This line correctly uses GCSFuse FLAGS)
80-
echo " Mount: gcsfuse $TEST_BUCKET $MOUNTED_DIR $FLAGS"
81-
mkdir -p "$MOUNTED_DIR"
94+
echo " Mount: $GCSFUSE_BINARY $FLAGS $TEST_BUCKET $MOUNTED_DIR"
95+
mkdir -p "$MOUNTED_DIR"
96+
"$GCSFUSE_BINARY" $FLAGS "$TEST_BUCKET" "$MOUNTED_DIR"
8297

8398
# RUN TEST
8499
# Command now correctly includes RUN_FLAG only when defined
85100
COMMAND="GODEBUG=asyncpreemptoff=1 go test $GO_TEST_DIR -p 1 --integrationTest -v --config-file=\"$CONFIG_FILE_ABS\" $RUN_FLAG"
86101
echo " Test: $COMMAND"
87102
eval $COMMAND # This line executes the command
88103

89-
# MOCK UNMOUNT
104+
# UNMOUNT
90105
echo " Unmount: fusermount -u $MOUNTED_DIR"
91-
rmdir "$MOUNTED_DIR" 2>/dev/null
106+
fusermount -u "$MOUNTED_DIR"
92107
done
93108
done

tools/integration_tests/test_config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ read_cache:
230230
- "--metadata-cache-ttl-secs=10 --file-cache-max-size-mb=9 --file-cache-enable-parallel-downloads=true -cache-dir=/gcsfuse-tmp/TestSmallCacheTTLTest --log-file=/gcsfuse-tmp/TestSmallCacheTTLTest.log --log-severity=TRACE"
231231
- "--metadata-cache-ttl-secs=10 --file-cache-max-size-mb=9 --file-cache-enable-parallel-downloads=false --cache-dir=/gcsfuse-tmp/TestSmallCacheTTLTest --log-file=/gcsfuse-tmp/TestSmallCacheTTLTest.log --log-severity=TRACE --client-protocol=grpc"
232232
- "--metadata-cache-ttl-secs=10 --file-cache-max-size-mb=9 --file-cache-enable-parallel-downloads=true -cache-dir=/gcsfuse-tmp/TestSmallCacheTTLTest --log-file=/gcsfuse-tmp/TestSmallCacheTTLTest.log --log-severity=TRACE -client-protocol=grpc --implicit-dirs"
233+
compatible:
234+
flat: true
235+
hns: true
236+
zonal: true
233237
run: TestSmallCacheTTLTest
234238
run_on_gke: true
235239
- flags:
@@ -518,7 +522,7 @@ interrupt:
518522

519523
log_rotation:
520524
- mounted_directory: "${MOUNTED_DIR}"
521-
test_bucket: ${BUCKET_NAME}"
525+
test_bucket: "${BUCKET_NAME}"
522526
log_file: /tmp/gcsfuse-tmp/LogRotationTest.log
523527
run_on_gke: true
524528
configs:
@@ -528,4 +532,4 @@ log_rotation:
528532
compatible:
529533
flat: true
530534
hns: true
531-
zonal: true
535+
zonal: true

0 commit comments

Comments
 (0)