agoda-com / agoda-com/AgodaAnalyzers
Declare a rule, when people are calling TestContainer build too early.
- Ngôn ngữ chính
- C#
- Star
- 25
- Fork
- 15
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
# Why?
When called in wrong order, then:
`Environment.SetEnvironmentVariable("TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX", "YOUR_INTERNAL_MIRROR");` does not work.
E.g. If you call
```
private readonly INetwork _network = new NetworkBuilder()
.WithName("shared_test_network")
.Build();
```
or
```
private PostgreSqlContainer _postgreSqlContainer = new PostgreSqlBuilder()
.WithNetwork(_network)
.WithNetworkAliases("postgres")
.Build()
```
before the Environment variable is set, then none of the images will get the variable.
# What?
Most likely we need a critical analyzer rule here.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.