agoda-com / agoda-com/AgodaAnalyzers

Declare a rule, when people are calling TestContainer build too early.

Đang mở
#194 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.