Skip to content

Commit

Permalink
Update SSNv1 and SSNv2 tests
Browse files Browse the repository at this point in the history
The SSNv1 and SSNv2 tests have been updated to use the new
SSNv2 nextRange location.
  • Loading branch information
edewata committed Nov 4, 2024
1 parent 116ef36 commit 678b8d0
Show file tree
Hide file tree
Showing 6 changed files with 269 additions and 108 deletions.
122 changes: 97 additions & 25 deletions .github/workflows/ca-clone-ssnv1-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ jobs:
docker exec primary pki-server ca-id-generator-update -v --type legacy2 request
docker exec primary pki-server ca-id-generator-update -v --type legacy2 cert
- name: Check old request range objects
- name: Check request range objects for SSNv1
if: always()
run: |
tests/ca/bin/ca-request-range-objects.sh primaryds | tee output
Expand All @@ -1084,7 +1084,7 @@ jobs:
diff expected output
- name: Check new request range objects
- name: Check request range objects for SSNv2
if: always()
run: |
tests/ca/bin/ca-request-range-objects.sh -t legacy2 primaryds | tee output
Expand All @@ -1100,7 +1100,7 @@ jobs:
diff expected output
- name: Check request next range
- name: Check request next range for SSNv1
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh primaryds | tee output
Expand All @@ -1112,7 +1112,19 @@ jobs:
diff expected output
- name: Check old cert range objects
- name: Check request next range for SSNv2
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh -t legacy2 primaryds | tee output
# request nextRange should remain the same
cat > expected << EOF
nextRange: 21
EOF
diff expected output
- name: Check cert range objects for SSNv1
if: always()
run: |
tests/ca/bin/ca-cert-range-objects.sh primaryds | tee output
Expand All @@ -1134,7 +1146,7 @@ jobs:
diff expected output
- name: Check new cert range objects
- name: Check cert range objects for SSNv2
if: always()
run: |
tests/ca/bin/ca-cert-range-objects.sh -t legacy2 primaryds | tee output
Expand All @@ -1151,12 +1163,24 @@ jobs:
diff expected output
- name: Check cert next range
- name: Check cert next range for SSNv1
if: always()
run: |
tests/ca/bin/ca-cert-next-range.sh primaryds | tee output
# cert nextRange should remain the same
# next range should remain the same
cat > expected << EOF
nextRange: 49
EOF
diff expected output
- name: Check cert next range for SSNv2
if: always()
run: |
tests/ca/bin/ca-cert-next-range.sh -t legacy2 primaryds | tee output
# next range should be endRange + 1
cat > expected << EOF
nextRange: 49
EOF
Expand Down Expand Up @@ -1273,7 +1297,7 @@ jobs:
diff expected output
- name: Check old request range objects
- name: Check request range objects for SSNv1
if: always()
run: |
tests/ca/bin/ca-request-range-objects.sh primaryds | tee output
Expand All @@ -1293,7 +1317,7 @@ jobs:
diff expected output
- name: Check new request range objects
- name: Check request range objects for SSNv2
if: always()
run: |
tests/ca/bin/ca-request-range-objects.sh -t legacy2 primaryds | tee output
Expand Down Expand Up @@ -1323,7 +1347,29 @@ jobs:
diff expected output
- name: Check old cert range objects
- name: Check request next range for SSNv1
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh primaryds | tee output
cat > expected << EOF
nextRange: 31
EOF
diff expected output
- name: Check request next range for SSNv2
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh -t legacy2 primaryds | tee output
cat > expected << EOF
nextRange: 51
EOF
diff expected output
- name: Check cert range objects for SSNv1
if: always()
run: |
tests/ca/bin/ca-cert-range-objects.sh primaryds | tee output
Expand All @@ -1344,7 +1390,7 @@ jobs:
diff expected output
- name: Check new cert range objects
- name: Check cert range objects for SSNv2
if: always()
run: |
tests/ca/bin/ca-cert-range-objects.sh -t legacy2 primaryds | tee output
Expand All @@ -1367,22 +1413,24 @@ jobs:
diff expected output
- name: Check request repository
- name: Check cert next range for SSNv1
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh primaryds | tee output
tests/ca/bin/ca-cert-next-range.sh primaryds | tee output
# next range should remain the same
cat > expected << EOF
nextRange: 51
nextRange: 49
EOF
diff expected output
- name: Check cert repository
- name: Check cert next range for SSNv2
if: always()
run: |
tests/ca/bin/ca-cert-next-range.sh primaryds | tee output
tests/ca/bin/ca-cert-next-range.sh -t legacy2 primaryds | tee output
# next range should be endRange + 1
cat > expected << EOF
nextRange: 73
EOF
Expand Down Expand Up @@ -1568,7 +1616,7 @@ jobs:
diff expected output
- name: Check old request range objects
- name: Check request range objects for SSNv1
if: always()
run: |
tests/ca/bin/ca-request-range-objects.sh primaryds | tee output
Expand All @@ -1588,7 +1636,7 @@ jobs:
diff expected output
- name: Check new request range objects
- name: Check request range objects for SSNv2
if: always()
run: |
tests/ca/bin/ca-request-range-objects.sh -t legacy2 primaryds | tee output
Expand Down Expand Up @@ -1643,7 +1691,29 @@ jobs:
diff expected output
- name: Check old cert range objects
- name: Check request next range for SSNv1
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh primaryds | tee output
cat > expected << EOF
nextRange: 31
EOF
diff expected output
- name: Check request next range for SSNv2
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh -t legacy2 primaryds | tee output
cat > expected << EOF
nextRange: 101
EOF
diff expected output
- name: Check cert range objects for SSNv1
if: always()
run: |
tests/ca/bin/ca-cert-range-objects.sh primaryds | tee output
Expand All @@ -1664,7 +1734,7 @@ jobs:
diff expected output
- name: Check new cert range objects
- name: Check cert range objects for SSNv2
if: always()
run: |
tests/ca/bin/ca-cert-range-objects.sh -t legacy2 primaryds | tee output
Expand Down Expand Up @@ -1699,22 +1769,24 @@ jobs:
diff expected output
- name: Check request repository
- name: Check cert next range for SSNv1
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh primaryds | tee output
tests/ca/bin/ca-cert-next-range.sh primaryds | tee output
# next range should remain the same
cat > expected << EOF
nextRange: 101
nextRange: 49
EOF
diff expected output
- name: Check cert repository
- name: Check cert next range for SSNv2
if: always()
run: |
tests/ca/bin/ca-cert-next-range.sh primaryds | tee output
tests/ca/bin/ca-cert-next-range.sh -t legacy2 primaryds | tee output
# next range should be endRange + 1
cat > expected << EOF
nextRange: 127
EOF
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/ca-clone-ssnv2-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
- name: Check request next range
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh primaryds | tee output
tests/ca/bin/ca-request-next-range.sh -t legacy2 primaryds | tee output
# nextRange should be endRange + 1 = 11
cat > expected << EOF
Expand All @@ -208,7 +208,7 @@ jobs:
- name: Check cert next range
if: always()
run: |
tests/ca/bin/ca-cert-next-range.sh primaryds | tee output
tests/ca/bin/ca-cert-next-range.sh -t legacy2 primaryds | tee output
# nextRange should be dbs.endSerialNumber + 1 = 0x19 or 25
cat > expected << EOF
Expand Down Expand Up @@ -412,7 +412,7 @@ jobs:
- name: Check request next range
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh secondaryds | tee output
tests/ca/bin/ca-request-next-range.sh -t legacy2 secondaryds | tee output
# nextRange should be the same
cat > expected << EOF
Expand All @@ -424,7 +424,7 @@ jobs:
- name: Check cert next range
if: always()
run: |
tests/ca/bin/ca-cert-next-range.sh secondaryds | tee output
tests/ca/bin/ca-cert-next-range.sh -t legacy2 secondaryds | tee output
# nextRange should be the same
cat > expected << EOF
Expand Down Expand Up @@ -579,7 +579,7 @@ jobs:
- name: Check request next range
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh primaryds | tee output
tests/ca/bin/ca-request-next-range.sh -t legacy2 primaryds | tee output
# nextRange should be the same
cat > expected << EOF
Expand All @@ -591,7 +591,7 @@ jobs:
- name: Check cert next range
if: always()
run: |
tests/ca/bin/ca-cert-next-range.sh primaryds | tee output
tests/ca/bin/ca-cert-next-range.sh -t legacy2 primaryds | tee output
# nextRange should be the same
cat > expected << EOF
Expand Down Expand Up @@ -885,7 +885,7 @@ jobs:
- name: Check request next range
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh primaryds | tee output
tests/ca/bin/ca-request-next-range.sh -t legacy2 primaryds | tee output
# nextRange should be endRange + 1 = 31
cat > expected << EOF
Expand All @@ -897,7 +897,7 @@ jobs:
- name: Check cert next range
if: always()
run: |
tests/ca/bin/ca-cert-next-range.sh primaryds | tee output
tests/ca/bin/ca-cert-next-range.sh -t legacy2 primaryds | tee output
# nextRange should be endRange + 1 = 61 or 0x3d
cat > expected << EOF
Expand Down Expand Up @@ -1081,7 +1081,7 @@ jobs:
- name: Check request next range
if: always()
run: |
tests/ca/bin/ca-request-next-range.sh primaryds | tee output
tests/ca/bin/ca-request-next-range.sh -t legacy2 primaryds | tee output
# nextRange should be the same
cat > expected << EOF
Expand All @@ -1093,7 +1093,7 @@ jobs:
- name: Check cert next range
if: always()
run: |
tests/ca/bin/ca-cert-next-range.sh primaryds | tee output
tests/ca/bin/ca-cert-next-range.sh -t legacy2 primaryds | tee output
# nextRange should be the same
cat > expected << EOF
Expand Down
Loading

0 comments on commit 678b8d0

Please sign in to comment.