Skip to content

Commit eed2ada

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

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/test.yml

Lines changed: 2 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:

internal/provider/testdata/bucket_lifecycle.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ 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 = ""
18+
}
19+
20+
noncurrent_version_expiration {
21+
newer_noncurrent_versions = 3
22+
}
23+
}
24+
1325
rule {
1426
id = "Expire non-current versions after 7 days"
1527

0 commit comments

Comments
 (0)