Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
fcfb709c
Commit
fcfb709c
authored
5 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[ci] Tests gRPC insert directories in CI
parent
362ebf02
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
continuousintegration/orchestration/tests/grpc_dir_inject.sh
+19
-15
19 additions, 15 deletions
continuousintegration/orchestration/tests/grpc_dir_inject.sh
with
19 additions
and
15 deletions
continuousintegration/orchestration/tests/grpc_dir_inject.sh
+
19
−
15
View file @
fcfb709c
...
@@ -47,36 +47,40 @@ ${EOS_CMD} mkdir -p ${EOS_PREFIX}
...
@@ -47,36 +47,40 @@ ${EOS_CMD} mkdir -p ${EOS_PREFIX}
# Create directory with system-assigned file id -- should succeed
# Create directory with system-assigned file id -- should succeed
echoc
$LT_BLUE
"Creating directory with auto-assigned file id"
echoc
$LT_BLUE
"Creating directory with auto-assigned file id"
${
EOS_TEST_DIR_INJECT
}
--path
${
CASTOR_PREFIX
}
/
my_
test_dir
>
${
TMPFILE
}
${
EOS_TEST_DIR_INJECT
}
--path
${
CASTOR_PREFIX
}
/test_dir
1
>
${
TMPFILE
}
[
$?
-eq
0
]
||
error
"Creating directory with auto-assigned file id failed"
[
$?
-eq
0
]
||
error
"Creating directory with auto-assigned file id failed"
json-pretty-print.sh
${
TMPFILE
}
json-pretty-print.sh
${
TMPFILE
}
rm
${
TMPFILE
}
rm
${
TMPFILE
}
${
EOS_CMD
}
ls
-l
${
EOS_PREFIX
}
${
EOS_CMD
}
ls
-l
${
EOS_PREFIX
}
${
EOS_CMD
}
fileinfo
${
EOS_PREFIX
}
/my_test_dir
${
EOS_CMD
}
fileinfo
${
EOS_PREFIX
}
/test_dir1
XrdSecPROTOCOL
=
sss
${
EOS_CMD
}
fileinfo
${
EOS_PREFIX
}
/my_test_dir
${
EOS_CMD
}
-r
2 2
rmdir
${
EOS_PREFIX
}
/test_dir1
${
EOS_CMD
}
rmdir
${
EOS_PREFIX
}
/my_test_dir
# Create directory with self-assigned file id -- should succeed
# Create directory with self-assigned file id -- should succeed
echoc
$LT_BLUE
"Creating directory with self-assigned file id"
echoc
$LT_BLUE
"Creating directory with self-assigned file id"
${
EOS_TEST_DIR_INJECT
}
--fileid
9876543210
--path
${
CASTOR_PREFIX
}
/
my_
test_dir
>
${
TMPFILE
}
${
EOS_TEST_DIR_INJECT
}
--fileid
9876543210
--path
${
CASTOR_PREFIX
}
/test_dir
2
>
${
TMPFILE
}
[
$?
-eq
0
]
||
error
"Creating directory with self-assigned file id failed"
[
$?
-eq
0
]
||
error
"Creating directory with self-assigned file id failed"
json-pretty-print.sh
${
TMPFILE
}
json-pretty-print.sh
${
TMPFILE
}
rm
${
TMPFILE
}
rm
${
TMPFILE
}
${
EOS_CMD
}
fileinfo
${
EOS_PREFIX
}
/my_test_dir
${
EOS_CMD
}
fileinfo
${
EOS_PREFIX
}
/test_dir2
# Try again -- should fail
echoc
$LT_GREEN
"Creating directory with the same path (should fail)"
${
EOS_TEST_DIR_INJECT
}
--path
${
CASTOR_PREFIX
}
/test_dir2
>
/dev/null
[
$?
-ne
0
]
||
error
"Creating directory with self-assigned file id succeeded when it should have failed"
# Try again -- should fail
# Try again -- should fail
echoc
$LT_GREEN
"Creating directory with the same file id (should fail)"
echoc
$LT_GREEN
"Creating directory with the same file id (should fail)"
${
EOS_TEST_DIR_INJECT
}
--fileid
9876543210
--path
${
CASTOR_PREFIX
}
/
my_
test_dir
2
>
/dev/null
${
EOS_TEST_DIR_INJECT
}
--fileid
9876543210
--path
${
CASTOR_PREFIX
}
/test_dir
3
>
/dev/null
[
$?
-ne
0
]
||
error
"Creating directory with self-assigned file id succeeded when it should have failed"
[
$?
-ne
0
]
||
error
"Creating directory with self-assigned file id succeeded when it should have failed"
# Remove and try again -- should succeed after restarting EOS
# Remove and try again -- should succeed
echoc
$LT_GREEN
"Remove the directory and restart EOS to remove the tombstone"
echoc
$LT_GREEN
"Remove the directory and tombstone"
${
EOS_CMD
}
rmdir
${
EOS_PREFIX
}
/my_test_dir
${
EOS_CMD
}
rmdir
${
EOS_PREFIX
}
/test_dir2
${
EOS_CMD
}
ns cache drop-single-container 9876543210
echoc
$LT_BLUE
"Recreate the directory with self-assigned file id (should succeed this time)"
echoc
$LT_BLUE
"Recreate the directory with self-assigned file id (should succeed this time)"
${
EOS_TEST_DIR_INJECT
}
--fileid
9876543210
--path
${
CASTOR_PREFIX
}
/
my_
test_dir
>
/dev/null
${
EOS_TEST_DIR_INJECT
}
--fileid
9876543210
--path
${
CASTOR_PREFIX
}
/test_dir
2
>
/dev/null
[
$?
-eq
0
]
||
error
"Creating directory with self-assigned file id failed with error
$?
"
[
$?
-eq
0
]
||
error
"Creating directory with self-assigned file id failed with error
$?
"
${
EOS_CMD
}
fileinfo
${
EOS_PREFIX
}
/my_test_dir
${
EOS_CMD
}
fileinfo
${
EOS_PREFIX
}
/test_dir2
${
EOS_CMD
}
-r
2 2
rmdir
${
EOS_PREFIX
}
/test_dir2
echoc
$LT_GREEN
"Cleaning up: removing tombstones and removing injected directories"
${
EOS_CMD
}
rmdir
${
EOS_PREFIX
}
/my_test_dir 2>/dev/null
${
EOS_CMD
}
rmdir
${
EOS_PREFIX
}
/my_test_dir2 2>/dev/null
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment