Skip to content

Commit 5b67cf8

Browse files
committed
test: validate lifecycle policy rule with newer_noncurrent_versions
1 parent 9d867b9 commit 5b67cf8

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- '**.go'
99
- 'go.mod'
1010
- 'go.sum'
11+
- 'internal/provider/testdata/*.tf'
1112
- '.github/workflows/test.yml'
1213
push:
1314
branches:
@@ -16,6 +17,7 @@ on:
1617
- '**.go'
1718
- 'go.mod'
1819
- 'go.sum'
20+
- 'internal/provider/testdata/*.tf'
1921
- '.github/workflows/test.yml'
2022

2123
permissions:
@@ -51,6 +53,7 @@ jobs:
5153
cli:
5254
- terraform
5355
- tofu
56+
fail-fast: false
5457
needs: build
5558
runs-on: ubuntu-latest
5659
timeout-minutes: 15

internal/provider/testdata/bucket_lifecycle.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ resource "objsto_bucket" "this" {
1010
resource "objsto_bucket_lifecycle_configuration" "this" {
1111
bucket = objsto_bucket.this.bucket
1212

13+
rule {
14+
id = "Expire non-current versions after 3 newer versions"
15+
16+
filter {
17+
prefix = "test/"
18+
}
19+
20+
noncurrent_version_expiration {
21+
noncurrent_days = 1
22+
newer_noncurrent_versions = 3
23+
}
24+
}
25+
1326
rule {
1427
id = "Expire non-current versions after 7 days"
1528

0 commit comments

Comments
 (0)