Skip to content

Commit 3198425

Browse files
authored
Fix build (#1222)
* Fix build * attempt to fix functional test * fix build issue * Disabled IncompleteUpload tests
1 parent 62ee5a4 commit 3198425

24 files changed

+43
-98
lines changed

.github/workflows/minio-dotnet.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,15 @@ jobs:
158158
# Execute all functional tests in the solution
159159
- name: Execute Functional Tests Linux
160160
env:
161+
CI: 1
161162
MINT_MODE: full
162163
SERVER_ENDPOINT: localhost:9000
163164
ACCESS_KEY: minio
164165
SECRET_KEY: minio123
165166
ENABLE_HTTPS: 1
166167
ENABLE_KMS: 1
167-
MINIO_ACCESS_KEY: minio
168-
MINIO_SECRET_KEY: minio123
168+
MINIO_ROOT_USER: minio
169+
MINIO_ROOT_PASSWORD: minio123
169170
MINIO_KMS_SECRET_KEY: my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
170171
run: |
171172
wget --quiet -O /tmp/minio https://dl.min.io/server/minio/release/linux-amd64/minio
@@ -175,6 +176,11 @@ jobs:
175176
sudo cp /tmp/minio-config/certs/public.crt /etc/ssl/certs/
176177
sudo cp /tmp/minio-config/certs/private.key /etc/ssl/private/
177178
/tmp/minio --certs-dir /tmp/minio-config/certs server /tmp/fs{1...4} &
179+
180+
wget --quiet -O /tmp/mc https://dl.min.io/client/mc/release/linux-amd64/mc
181+
chmod +x /tmp/mc
182+
MC_HOST_test=https://minio:minio123@localhost:9000 /tmp/mc --insecure ready test
183+
178184
dotnet Minio.Functional.Tests/bin/Release/net8.0/Minio.Functional.Tests.dll
179185
180186
push_to_nuget:

FileUploader/FileUpload.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private static bool IsWindows()
3434
return OperatingSystem.IsWindows();
3535
}
3636

37-
private static async Task Main(string[] args)
37+
private static async Task Main()
3838
{
3939
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
4040
| SecurityProtocolType.Tls11

Minio.Examples/Cases/GetBucketPolicy.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ internal static class GetBucketPolicy
2222
{
2323
// Get bucket policy
2424
public static async Task Run(IMinioClient minio,
25-
string bucketName = "my-bucket-name",
26-
string prefix = "")
25+
string bucketName = "my-bucket-name")
2726
{
2827
try
2928
{

Minio.Examples/Cases/ListenBucketNotifications.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ public static void Run(IMinioClient minio,
2626
string bucketName = "my-bucket-name",
2727
List<EventType> events = null,
2828
string prefix = "",
29-
string suffix = "",
30-
bool recursive = true)
29+
string suffix = "")
3130
{
3231
try
3332
{

Minio.Examples/Cases/ListenNotifications.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2024 MinIO, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -40,7 +40,7 @@ public static void Run(IMinioClient minio,
4040
() => Console.WriteLine("Stopped listening for bucket notifications\n"));
4141

4242
Console.WriteLine("Press any key to stop listening for notifications...");
43-
Console.ReadLine();
43+
_ = Console.ReadLine();
4444
}
4545
catch (Exception e)
4646
{

Minio.Examples/Cases/PresignedGetObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public static async Task Run(IMinioClient client,
3535
.WithObject(objectName)
3636
.WithExpiry(1000)
3737
.WithHeaders(reqParams);
38-
var presignedUrl = await client.PresignedGetObjectAsync(args).ConfigureAwait(false);
38+
_ = await client.PresignedGetObjectAsync(args).ConfigureAwait(false);
3939
}
4040
}

Minio.Examples/Cases/PresignedPostPolicy.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616

1717
using Minio.DataModel;
18-
using Minio.DataModel.Args;
1918

2019
namespace Minio.Examples.Cases;
2120

@@ -34,14 +33,10 @@ public static async Task Run(IMinioClient client,
3433
form.SetBucket(bucketName);
3534
form.SetExpires(expiration);
3635

37-
var args = new PresignedPostPolicyArgs()
38-
.WithBucket(bucketName)
39-
.WithObject(objectName)
40-
.WithPolicy(form);
41-
4236
var tuple = await client.PresignedPostPolicyAsync(form).ConfigureAwait(false);
4337
var curlCommand = "curl -k --insecure -X POST";
4438
foreach (var pair in tuple.Item2) curlCommand += $" -F {pair.Key}={pair.Value}";
4539
curlCommand = curlCommand + " -F file=@/etc/issue " + tuple.Item1 + bucketName + "/";
40+
_ = curlCommand;
4641
}
4742
}

Minio.Examples/Cases/SelectObjectContent.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ internal static class SelectObjectContent
2626
// Get object in a bucket
2727
public static async Task Run(IMinioClient minio,
2828
string bucketName = "my-bucket-name",
29-
string objectName = "my-object-name",
30-
string fileName = "my-file-name")
29+
string objectName = "my-object-name")
3130
{
3231
if (minio is null) throw new ArgumentNullException(nameof(minio));
3332

Minio.Examples/Cases/StatObjectQuery.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ public static async Task Run(IMinioClient minio,
5959
{
6060
var objectNameInfo = $"{bucketName}-{bucketObject}";
6161
if (!string.IsNullOrEmpty(versionID))
62-
objectNameInfo = objectNameInfo +
63-
$" (Version ID) {me.Response.VersionId} (Marked DEL) {me.Response.DeleteMarker}";
62+
objectNameInfo += $" (Version ID) {me.Response.VersionId} (Marked DEL) {me.Response.DeleteMarker}";
6463

6564
Console.WriteLine($"[StatObject] {objectNameInfo} Exception: {me}");
6665
}

Minio.Examples/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static async Task Main()
123123
for (var i = 0; i < 10; i++) objectsList.Add(objectName + i);
124124

125125
// Set app Info
126-
minioClient.SetAppInfo("app-name", "app-version");
126+
_ = minioClient.SetAppInfo("app-name", "app-version");
127127

128128
// Set HTTP Tracing On
129129
// minioClient.SetTraceOn();

0 commit comments

Comments
 (0)