Skip to content

Commit a11b73c

Browse files
authored
Add test to check S3Config can be applied (#1982)
Closes #1880
1 parent b79f813 commit a11b73c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package io.micronaut.aws.sdk.v2.service
2+
3+
import io.micronaut.aws.sdk.v2.service.s3.S3ConfigurationProperties
4+
import io.micronaut.context.ApplicationContext
5+
import spock.lang.Issue
6+
import spock.lang.Specification
7+
8+
@Issue("https://github.com/micronaut-projects/micronaut-aws/issues/1880")
9+
class S3ConfigurationSpec extends Specification {
10+
11+
void "path-style-access-enabled can be configured to be #enabled"() {
12+
when:
13+
ApplicationContext ctx = ApplicationContext.run(
14+
'aws.s3.path-style-access-enabled': enabled
15+
)
16+
S3ConfigurationProperties config = ctx.getBean(S3ConfigurationProperties)
17+
18+
then:
19+
config.builder.pathStyleAccessEnabled() == enabled
20+
21+
cleanup:
22+
ctx.close()
23+
24+
where:
25+
enabled << [true, false]
26+
}
27+
}

0 commit comments

Comments
 (0)