Commit b697a778 authored by Ophélie Gagnard's avatar Ophélie Gagnard

Add drafts for tests.

parent 25d632ba
networkcache-download --config ../../tls-access-to-shacache/test.cfg --id river-test "mca-version>=[0,3,1]" "kernel-version<=[5,10,149,1]"
echo "Creating benchmark files..."
dir=d.full
mkdir -p "$dir"
for i in {001..010}; do
echo -n "$i" > "$dir/test$i"
done
# kernel versions:
# 5.10.149-2
# 5.10.149-1
# 5.10.113-1
# mca versions:
# 0.3.1+1.0.293.nodep-1
# 0.3.1+1.0.293-1
# 0.3+1.0.293-1
# flb versions:
# 1.9.8+1.0.293.nodep-1
# 1.9.8+1.0.293-1
# 1.9.7+1.0.294-1
# 1.9.7+1.0.293-1
# plugin versions:
# 0.2.1+1.0.293.nodep-1
# 0.2.1+1.0.293-1
# 0.2+1.0.293.nodep-1
# 0.2+1.0.293-1
echo "First test..."
id=river-test
group=douai
cfg_file=../../tls-access-to-shacache/test.cfg
owner=NoKey
echo id="$id"
echo group="$group"
echo cfg_file="$cfg_file"
echo owner="$owner"
echo "Upload 1/4..."
# low versions
echo "{\"kernel-version\": [5, 10, 113, 1], \"mca-version\": [0, 3], \"flb-version\": [1, 9, 7], \"plg-version\": [0, 2], \"timestamp\": $(date +%s)}" > "$dir/a_metadata"
networkcache-upload --conf "$cfg_file" --id "$id" \
--file "$dir/test001" --metadata "$dir/a_metadata" \
server-group="$group" owner="$signing_key_owner" \
comment="low versions"
echo "Upload 2/4..."
# intermediate 1: up flb, down plg
echo "{\"kernel-version\": [5, 10, 149, 1], \"mca-version\": [0, 3, 1], \"flb-version\": [1, 9, 8], \"plg-version\": [0, 2], \"timestamp\": $(date +%s)}" > "$dir/b_metadata"
networkcache-upload --conf "$cfg_file" --id "$id" \
--file "$dir/test002" --metadata "$dir/b_metadata" \
server-group=\""$group"\" owner=\""$signing_key_owner"\" \
comment=\""intermediate versions 1"\"
echo "Upload 3/4..."
# intermediate 2: up plg, down flb
echo "{\"kernel-version\": [5, 10, 149, 1], \"mca-version\": [0, 3, 1], \"flb-version\": [1, 9, 7], \"plg-version\": [0, 2, 1], \"timestamp\": $(date +%s)}" > "$dir/c_metadata"
networkcache-upload --conf "$cfg_file" --id "$id" \
--file "$dir/test003" --metadata "$dir/c_metadata" \
server-group=\""$group"\" owner=\""$signing_key_owner"\" \
comment=\""intermediate versions 2"\"
echo "Upload 4/4..."
# high versions
echo "{\"kernel-version\": [5, 10, 149, 2], \"mca-version\": [0, 3, 1], \"flb-version\": [1, 9, 8], \"plg-version\": [0, 2, 1], \"timestamp\": $(date +%s)}" > "$dir/d_metadata"
networkcache-upload --conf "$cfg_file" --id "$id" \
--file "$dir/test004" --metadata "$dir/d_metadata" \
server-group=\""$group"\" owner=\""$signing_key_owner"\" \
comment=\""high versions"\"
echo "Uploaded."
echo "Creating benchmark files..."
dir=d.full
mkdir -p "$dir"
for i in {001..010}; do
echo -n "$i" > "$dir/test$i"
done
# kernel versions:
# 5.10.149-2
# 5.10.149-1
# 5.10.113-1
# mca versions:
# 0.3.1+1.0.293.nodep-1
# 0.3.1+1.0.293-1
# 0.3+1.0.293-1
# flb versions:
# 1.9.8+1.0.293.nodep-1
# 1.9.8+1.0.293-1
# 1.9.7+1.0.294-1
# 1.9.7+1.0.293-1
# plugin versions:
# 0.2.1+1.0.293.nodep-1
# 0.2.1+1.0.293-1
# 0.2+1.0.293.nodep-1
# 0.2+1.0.293-1
echo "First test..."
id=river-test
group=douai
cfg_file=../../tls-access-to-shacache/test.cfg
owner=NoKey
echo id="$id"
echo group="$group"
echo cfg_file="$cfg_file"
echo owner="$owner"
echo "Upload 1/4..."
# low versions
echo "{\"kernel-version\": [5, 10, 113, 1], \"mca-version\": [0, 3], \"flb-version\": [1, 9, 7], \"plg-version\": [0, 2], \"timestamp\": $(date +%s)}" > "$dir/a_metadata"
networkcache-upload --conf "$cfg_file" --id "$id" \
--file "$dir/test001" --metadata "$dir/a_metadata" \
server-group="$group" owner="$signing_key_owner" \
comment="low versions"
echo "Upload 2/4..."
# intermediate 1: up flb, down plg
echo "{\"kernel-version\": [5, 10, 149, 1], \"mca-version\": [0, 3, 1], \"flb-version\": [1, 9, 8], \"plg-version\": [0, 2], \"timestamp\": $(date +%s)}" > "$dir/b_metadata"
networkcache-upload --conf "$cfg_file" --id "$id" \
--file "$dir/test002" --metadata "$dir/b_metadata" \
server-group=\""$group"\" owner=\""$signing_key_owner"\" \
comment=\""intermediate versions 1"\"
echo "Upload 3/4..."
# intermediate 2: up plg, down flb
echo "{\"kernel-version\": [5, 10, 149, 1], \"mca-version\": [0, 3, 1], \"flb-version\": [1, 9, 7], \"plg-version\": [0, 2, 1], \"timestamp\": $(date +%s)}" > "$dir/c_metadata"
networkcache-upload --conf "$cfg_file" --id "$id" \
--file "$dir/test003" --metadata "$dir/c_metadata" \
server-group=\""$group"\" owner=\""$signing_key_owner"\" \
comment=\""intermediate versions 2"\"
echo "Upload 4/4..."
# high versions
echo "{\"kernel-version\": [5, 10, 149, 2], \"mca-version\": [0, 3, 1], \"flb-version\": [1, 9, 8], \"plg-version\": [0, 2, 1], \"timestamp\": $(date +%s)}" > "$dir/d_metadata"
networkcache-upload --conf "$cfg_file" --id "$id" \
--file "$dir/test004" --metadata "$dir/d_metadata" \
server-group=\""$group"\" owner=\""$signing_key_owner"\" \
comment=\""high versions"\"
echo "Uploaded."
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment