|
| 1 | +suite: Custom S3 Bucket Names |
| 2 | +templates: |
| 3 | + - ../charts/judge-api/templates/deployment.yaml |
| 4 | + - ../charts/archivista/templates/deployment.yaml |
| 5 | + |
| 6 | +tests: |
| 7 | + # ============================================================================ |
| 8 | + # JUDGE-API BUCKET OVERRIDE TESTS |
| 9 | + # ============================================================================ |
| 10 | + |
| 11 | + - it: should use default judge-api bucket name when no override provided |
| 12 | + template: ../charts/judge-api/templates/deployment.yaml |
| 13 | + set: |
| 14 | + global.aws.enabled: true |
| 15 | + global.aws.prefix: demo-judge |
| 16 | + global.mode: aws |
| 17 | + asserts: |
| 18 | + - equal: |
| 19 | + path: spec.template.spec.containers[0].env[?(@.name=="BLOB_STORE_BUCKET_NAME")].value |
| 20 | + value: demo-judge-judge |
| 21 | + |
| 22 | + - it: should use custom judge-api bucket name when override provided |
| 23 | + template: ../charts/judge-api/templates/deployment.yaml |
| 24 | + set: |
| 25 | + global.aws.enabled: true |
| 26 | + global.aws.prefix: demo-judge |
| 27 | + global.mode: aws |
| 28 | + global.buckets.judgeApi: my-company-artifacts |
| 29 | + asserts: |
| 30 | + - equal: |
| 31 | + path: spec.template.spec.containers[0].env[?(@.name=="BLOB_STORE_BUCKET_NAME")].value |
| 32 | + value: my-company-artifacts |
| 33 | + |
| 34 | + # ============================================================================ |
| 35 | + # ARCHIVISTA BUCKET OVERRIDE TESTS |
| 36 | + # ============================================================================ |
| 37 | + |
| 38 | + - it: should use default archivista bucket name when no override provided |
| 39 | + template: ../charts/archivista/templates/deployment.yaml |
| 40 | + set: |
| 41 | + global.aws.enabled: true |
| 42 | + global.aws.prefix: demo-judge |
| 43 | + global.mode: aws |
| 44 | + asserts: |
| 45 | + - equal: |
| 46 | + path: spec.template.spec.containers[0].env[?(@.name=="ARCHIVISTA_BLOB_STORE_BUCKET_NAME")].value |
| 47 | + value: demo-judge-archivista |
| 48 | + |
| 49 | + - it: should use custom archivista bucket name when override provided |
| 50 | + template: ../charts/archivista/templates/deployment.yaml |
| 51 | + set: |
| 52 | + global.aws.enabled: true |
| 53 | + global.aws.prefix: demo-judge |
| 54 | + global.mode: aws |
| 55 | + global.buckets.archivista: my-company-attestations |
| 56 | + asserts: |
| 57 | + - equal: |
| 58 | + path: spec.template.spec.containers[0].env[?(@.name=="ARCHIVISTA_BLOB_STORE_BUCKET_NAME")].value |
| 59 | + value: my-company-attestations |
| 60 | + |
| 61 | + # ============================================================================ |
| 62 | + # BACKWARD COMPATIBILITY TEST |
| 63 | + # ============================================================================ |
| 64 | + |
| 65 | + - it: should work when global.buckets is not defined at all |
| 66 | + template: ../charts/judge-api/templates/deployment.yaml |
| 67 | + set: |
| 68 | + global.aws.enabled: true |
| 69 | + global.aws.prefix: demo-judge |
| 70 | + global.mode: aws |
| 71 | + asserts: |
| 72 | + - equal: |
| 73 | + path: spec.template.spec.containers[0].env[?(@.name=="BLOB_STORE_BUCKET_NAME")].value |
| 74 | + value: demo-judge-judge |
0 commit comments