Skip to content

Commit ec6e82d

Browse files
committed
Fix minio client setup in integration test
Signed-off-by: Victor Chang <[email protected]>
1 parent 3c46be7 commit ec6e82d

File tree

7 files changed

+23
-14
lines changed

7 files changed

+23
-14
lines changed

src/InformaticsGateway/appsettings.Test.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
},
1212
"messaging": {
1313
"publisherSettings": {
14-
"endpoint": "172.18.0.4",
14+
"endpoint": "172.28.0.1",
1515
"username": "rabbitmq",
1616
"password": "rabbitmq",
1717
"virtualHost": "monaideploy",
1818
"exchange": "monaideploy"
1919
},
2020
"subscriberSettings": {
21-
"endpoint": "172.18.0.4",
21+
"endpoint": "172.28.0.1",
2222
"username": "rabbitmq",
2323
"password": "rabbitmq",
2424
"virtualHost": "monaideploy",
@@ -31,7 +31,7 @@
3131
"bucketName": "monai",
3232
"temporaryBucketName": "monai",
3333
"settings": {
34-
"endpoint": "172.18.0.2:9000",
34+
"endpoint": "172.28.0.1:9000",
3535
"accessKey": "minioadmin",
3636
"accessToken": "minioadmin",
3737
"securedConnection": false,
@@ -59,4 +59,4 @@
5959
}
6060
}
6161
}
62-
}
62+
}

tests/Integration.Test/StepDefinitions/AcrApiStepDefinitions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ public async Task ThenAStudyIsUploadedToTheStorageService()
193193
{
194194
var minioClient = new MinioClient()
195195
.WithEndpoint(_configuration.StorageServiceOptions.Endpoint)
196-
.WithCredentials(_configuration.StorageServiceOptions.AccessKey, _configuration.StorageServiceOptions.AccessToken);
196+
.WithCredentials(_configuration.StorageServiceOptions.AccessKey, _configuration.StorageServiceOptions.AccessToken)
197+
.Build();
197198

198199
var dicomSizes = _scenarioContext[KeyDicomHashes] as Dictionary<string, string>;
199200
_rabbitMqHooks.MessageWaitHandle.Wait(MessageWaitTimeSpan).Should().BeTrue();

tests/Integration.Test/StepDefinitions/ExportServicesStepDefinitions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ public async Task GivenDICOMInstances(int studyCount, string modality)
118118

119119
var minioClient = new MinioClient()
120120
.WithEndpoint(_configuration.StorageServiceOptions.Endpoint)
121-
.WithCredentials(_configuration.StorageServiceOptions.AccessKey, _configuration.StorageServiceOptions.AccessToken);
121+
.WithCredentials(_configuration.StorageServiceOptions.AccessKey, _configuration.StorageServiceOptions.AccessToken)
122+
.Build();
122123

123124
_outputHelper.WriteLine($"Uploading {fileSpecs.FileCount} files to MinIO...");
124125
foreach (var file in fileSpecs.Files)

tests/Integration.Test/StepDefinitions/FhirDefinitions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ public async Task ThenFhirResourcesAreUploadedToStorageService()
116116

117117
var minioClient = new MinioClient()
118118
.WithEndpoint(_configuration.StorageServiceOptions.Endpoint)
119-
.WithCredentials(_configuration.StorageServiceOptions.AccessKey, _configuration.StorageServiceOptions.AccessToken);
119+
.WithCredentials(_configuration.StorageServiceOptions.AccessKey, _configuration.StorageServiceOptions.AccessToken)
120+
.Build();
120121

121122
foreach (var message in messages)
122123
{

tests/Integration.Test/StepDefinitions/HealthLevel7Definitions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ public async Task ThenMessageAreUploadedToStorageService()
193193

194194
var minioClient = new MinioClient()
195195
.WithEndpoint(_configuration.StorageServiceOptions.Endpoint)
196-
.WithCredentials(_configuration.StorageServiceOptions.AccessKey, _configuration.StorageServiceOptions.AccessToken);
196+
.WithCredentials(_configuration.StorageServiceOptions.AccessKey, _configuration.StorageServiceOptions.AccessToken)
197+
.Build();
197198

198199
var listOjbectsArgs = new ListObjectsArgs()
199200
.WithBucket(request.Bucket)

tests/Integration.Test/StepDefinitions/SharedDefinitions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ public async Task ThenXXFilesUploadedToStorageService()
109109
{
110110
var minioClient = new MinioClient()
111111
.WithEndpoint(_configuration.StorageServiceOptions.Endpoint)
112-
.WithCredentials(_configuration.StorageServiceOptions.AccessKey, _configuration.StorageServiceOptions.AccessToken);
112+
.WithCredentials(_configuration.StorageServiceOptions.AccessKey, _configuration.StorageServiceOptions.AccessToken)
113+
.Build();
113114

114115
var dicomSizes = _scenarioContext[KeyDicomHashes] as Dictionary<string, string>;
115116
_rabbitMqHooks.MessageWaitHandle.Wait(MessageWaitTimeSpan).Should().BeTrue();

tests/Integration.Test/debug.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616

1717
# enable(1)/disable(0) VS code attach debuger
18-
export VSTEST_HOST_DEBUG=0
1918

2019
export SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
2120
TEST_DIR="$SCRIPT_DIR/"
@@ -91,9 +90,9 @@ function start_services() {
9190
docker network inspect testrunner
9291
info "============================================="
9392

94-
info "Stopping Informatics Gateway for debugging..."
95-
ig_contianer=$(docker container ls --format 'table {{.Names}}\t{{.ID}}' | grep integrationtest-informatics-gateway | awk '{print $2}')
96-
docker kill $ig_contianer
93+
# info "Stopping Informatics Gateway for debugging..."
94+
# ig_contianer=$(docker container ls --format 'table {{.Names}}\t{{.ID}}' | grep integrationtest-informatics-gateway | awk '{print $2}')
95+
# docker kill $ig_contianer
9796

9897
sleep 1
9998
sudo chown -R $USER:$USER $RUN_DIR
@@ -114,7 +113,12 @@ function main() {
114113
env_setup "$@"
115114
build
116115
start_services
117-
docker compose logs -f
116+
# docker compose logs -f
117+
118+
echo execute the following:
119+
echo " export HOST_IP=$HOST_IP"
120+
echo " export VSTEST_HOST_DEBUG=1"
121+
echo " dotnet test --filter XYZ"
118122
}
119123

120124
main "$@"

0 commit comments

Comments
 (0)