Skip to content

Commit

Permalink
chore(deps): update dependency azure.storage.files.shares to 12.20.1 (#…
Browse files Browse the repository at this point in the history
…3040)

* chore(deps): update dependency azure.storage.files.shares to 12.20.1

* Update package lock files

* chore(deps): update dependency azure.storage.files.shares to 12.20.1

* Update package lock files

* Properly mock mockreponses

* Fix unit test setup for failing tests

* Update package lock files

* Update package lock files

---------

Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io>
Co-authored-by: Rouke Broersma <Rouke.Broersma@infosupport.com>
Co-authored-by: Liam Rougoor <liam.rougoor@infosupport.com>
  • Loading branch information
4 people authored Dec 24, 2024
1 parent 4230bd8 commit 67bf892
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 127 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<ItemGroup>
<PackageVersion Include="Azure.Storage.Files.Shares" Version="12.19.1" />
<PackageVersion Include="Azure.Storage.Files.Shares" Version="12.20.1" />
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.2.25" />
<PackageVersion Include="LaunchDarkly.EventSource" Version="5.1.0" />
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
Expand Down
69 changes: 40 additions & 29 deletions src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,25 @@
},
"Azure.Core": {
"type": "Transitive",
"resolved": "1.41.0",
"contentHash": "7OO8rPCVSvXj2IQET3NkRf8hU2ZDCCvCIUhlrE089qkLNpNfWufJnBwHRKLAOWF3bhKBGJS/9hPBgjJ8kupUIg==",
"resolved": "1.44.1",
"contentHash": "YyznXLQZCregzHvioip07/BkzjuWNXogJEVz9T5W6TwjNr17ax41YGzYMptlo2G10oLCuVPoyva62y0SIRDixg==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
"System.ClientModel": "1.0.0",
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"System.ClientModel": "1.1.0",
"System.Diagnostics.DiagnosticSource": "6.0.1",
"System.Memory.Data": "1.0.2",
"System.Memory.Data": "6.0.0",
"System.Numerics.Vectors": "4.5.0",
"System.Text.Encodings.Web": "4.7.2",
"System.Text.Json": "4.7.2",
"System.Text.Encodings.Web": "6.0.0",
"System.Text.Json": "6.0.10",
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Azure.Storage.Common": {
"type": "Transitive",
"resolved": "12.20.1",
"contentHash": "KKBFnc4WZ6m9HgsKgwfO1cIxd154b8cAnP3uWhuelvFkzxqBXQQgIsHF0n3DYBG2AoTJCZDXwJpKuVC7CsKJWg==",
"resolved": "12.21.1",
"contentHash": "NgDJw/upcro33AgGf91sPIG+BU2pFTgGDBzWEp8HctGwzmbjG80eYTl4CJMIwgxVOQWnEXnQZXLY7w3k+BQ9ig==",
"dependencies": {
"Azure.Core": "1.41.0",
"Azure.Core": "1.44.1",
"System.IO.Hashing": "6.0.0"
}
},
Expand Down Expand Up @@ -147,8 +147,8 @@
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "yuvf07qFWFqtK3P/MRkEKLhn5r2UbSpVueRziSqj0yJQIKFwG1pq9mOayK3zE5qZCTs0CbrwL9M6R8VwqyGy2w=="
"resolved": "6.0.0",
"contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg=="
},
"Microsoft.Build": {
"type": "Transitive",
Expand Down Expand Up @@ -450,11 +450,11 @@
},
"System.ClientModel": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "I3CVkvxeqFYjIVEP59DnjbeoGNfo/+SZrCLpRz2v/g0gpCHaEMPtWSY0s9k/7jR1rAsLNg2z2u1JRB76tPjnIw==",
"resolved": "1.1.0",
"contentHash": "UocOlCkxLZrG2CKMAAImPcldJTxeesHnHGHwhJ0pNlZEvEXcWKuQvVOER2/NiOkJGRJk978SNdw3j6/7O9H1lg==",
"dependencies": {
"System.Memory.Data": "1.0.2",
"System.Text.Json": "4.7.2"
"System.Text.Json": "6.0.9"
}
},
"System.CodeDom": {
Expand Down Expand Up @@ -566,11 +566,10 @@
},
"System.Memory.Data": {
"type": "Transitive",
"resolved": "1.0.2",
"contentHash": "JGkzeqgBsiZwKJZ1IxPNsDFZDhUvuEdX8L8BDC8N3KOj+6zMcNU28CNN59TpZE/VJYy9cP+5M+sbxtWJx3/xtw==",
"resolved": "6.0.0",
"contentHash": "ntFHArH3I4Lpjf5m4DCXQHJuGwWPNVJPaAvM95Jy/u+2Yzt2ryiyIN04LAogkjP9DeRcEOiviAjQotfmPq/FrQ==",
"dependencies": {
"System.Text.Encodings.Web": "4.7.2",
"System.Text.Json": "4.6.0"
"System.Text.Json": "6.0.0"
}
},
"System.Numerics.Vectors": {
Expand Down Expand Up @@ -654,6 +653,11 @@
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
},
"System.Runtime.Extensions": {
"type": "Transitive",
"resolved": "4.1.0",
Expand Down Expand Up @@ -779,13 +783,20 @@
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "4.7.2",
"contentHash": "iTUgB/WtrZ1sWZs84F2hwyQhiRH6QNjQv2DkwrH+WP6RoFga2Q1m3f9/Q7FG8cck8AdHitQkmkXSY8qylcDmuA=="
"resolved": "6.0.0",
"contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "4.7.2",
"contentHash": "TcMd95wcrubm9nHvJEQs70rC0H/8omiSGGpU4FQ/ZA1URIqD4pjmFJh2Mfv1yH1eHgJDWTi2hMDXwTET+zOOyg=="
"resolved": "6.0.10",
"contentHash": "NSB0kDipxn2ychp88NXWfFRFlmi1bst/xynOutbnpEfRCT9JZkZ7KOmF/I/hNKo2dILiMGnqblm+j1sggdLB9g==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encodings.Web": "6.0.0"
}
},
"System.Threading": {
"type": "Transitive",
Expand Down Expand Up @@ -843,7 +854,7 @@
"stryker": {
"type": "Project",
"dependencies": {
"Azure.Storage.Files.Shares": "[12.19.1, )",
"Azure.Storage.Files.Shares": "[12.20.1, )",
"Buildalyzer": "[7.1.0, )",
"DotNet.Glob": "[3.1.3, )",
"Grynwald.MarkdownGenerator": "[3.0.106, )",
Expand Down Expand Up @@ -919,12 +930,12 @@
},
"Azure.Storage.Files.Shares": {
"type": "CentralTransitive",
"requested": "[12.19.1, )",
"resolved": "12.19.1",
"contentHash": "ezJZYp+B+ggcVq2SSdKV+X1mwNOdcpRhj/1+wucu81MPspCryVc3Lo/SmvmiYcttgbu0rYgdmh2uxCU/8N2sPw==",
"requested": "[12.20.1, )",
"resolved": "12.20.1",
"contentHash": "Ovds3flK+t+evPRPNGGU5l4irhIcvhAqyDAcr6E3dXHvidJrdllNSaGSj+v36rIzcivIS4bCDKy390RRnBRScQ==",
"dependencies": {
"Azure.Storage.Common": "12.20.1",
"System.Text.Json": "4.7.2"
"Azure.Storage.Common": "12.21.1",
"System.Text.Json": "6.0.10"
}
},
"Buildalyzer": {
Expand Down
69 changes: 40 additions & 29 deletions src/Stryker.CLI/Stryker.CLI/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,25 @@
},
"Azure.Core": {
"type": "Transitive",
"resolved": "1.41.0",
"contentHash": "7OO8rPCVSvXj2IQET3NkRf8hU2ZDCCvCIUhlrE089qkLNpNfWufJnBwHRKLAOWF3bhKBGJS/9hPBgjJ8kupUIg==",
"resolved": "1.44.1",
"contentHash": "YyznXLQZCregzHvioip07/BkzjuWNXogJEVz9T5W6TwjNr17ax41YGzYMptlo2G10oLCuVPoyva62y0SIRDixg==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
"System.ClientModel": "1.0.0",
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"System.ClientModel": "1.1.0",
"System.Diagnostics.DiagnosticSource": "6.0.1",
"System.Memory.Data": "1.0.2",
"System.Memory.Data": "6.0.0",
"System.Numerics.Vectors": "4.5.0",
"System.Text.Encodings.Web": "4.7.2",
"System.Text.Json": "4.7.2",
"System.Text.Encodings.Web": "6.0.0",
"System.Text.Json": "6.0.10",
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Azure.Storage.Common": {
"type": "Transitive",
"resolved": "12.20.1",
"contentHash": "KKBFnc4WZ6m9HgsKgwfO1cIxd154b8cAnP3uWhuelvFkzxqBXQQgIsHF0n3DYBG2AoTJCZDXwJpKuVC7CsKJWg==",
"resolved": "12.21.1",
"contentHash": "NgDJw/upcro33AgGf91sPIG+BU2pFTgGDBzWEp8HctGwzmbjG80eYTl4CJMIwgxVOQWnEXnQZXLY7w3k+BQ9ig==",
"dependencies": {
"Azure.Core": "1.41.0",
"Azure.Core": "1.44.1",
"System.IO.Hashing": "6.0.0"
}
},
Expand All @@ -68,8 +68,8 @@
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "yuvf07qFWFqtK3P/MRkEKLhn5r2UbSpVueRziSqj0yJQIKFwG1pq9mOayK3zE5qZCTs0CbrwL9M6R8VwqyGy2w=="
"resolved": "6.0.0",
"contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg=="
},
"Microsoft.Build": {
"type": "Transitive",
Expand Down Expand Up @@ -293,11 +293,11 @@
},
"System.ClientModel": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "I3CVkvxeqFYjIVEP59DnjbeoGNfo/+SZrCLpRz2v/g0gpCHaEMPtWSY0s9k/7jR1rAsLNg2z2u1JRB76tPjnIw==",
"resolved": "1.1.0",
"contentHash": "UocOlCkxLZrG2CKMAAImPcldJTxeesHnHGHwhJ0pNlZEvEXcWKuQvVOER2/NiOkJGRJk978SNdw3j6/7O9H1lg==",
"dependencies": {
"System.Memory.Data": "1.0.2",
"System.Text.Json": "4.7.2"
"System.Text.Json": "6.0.9"
}
},
"System.CodeDom": {
Expand Down Expand Up @@ -401,11 +401,10 @@
},
"System.Memory.Data": {
"type": "Transitive",
"resolved": "1.0.2",
"contentHash": "JGkzeqgBsiZwKJZ1IxPNsDFZDhUvuEdX8L8BDC8N3KOj+6zMcNU28CNN59TpZE/VJYy9cP+5M+sbxtWJx3/xtw==",
"resolved": "6.0.0",
"contentHash": "ntFHArH3I4Lpjf5m4DCXQHJuGwWPNVJPaAvM95Jy/u+2Yzt2ryiyIN04LAogkjP9DeRcEOiviAjQotfmPq/FrQ==",
"dependencies": {
"System.Text.Encodings.Web": "4.7.2",
"System.Text.Json": "4.6.0"
"System.Text.Json": "6.0.0"
}
},
"System.Numerics.Vectors": {
Expand Down Expand Up @@ -489,6 +488,11 @@
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
},
"System.Runtime.Extensions": {
"type": "Transitive",
"resolved": "4.1.0",
Expand Down Expand Up @@ -614,13 +618,20 @@
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "4.7.2",
"contentHash": "iTUgB/WtrZ1sWZs84F2hwyQhiRH6QNjQv2DkwrH+WP6RoFga2Q1m3f9/Q7FG8cck8AdHitQkmkXSY8qylcDmuA=="
"resolved": "6.0.0",
"contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "4.7.2",
"contentHash": "TcMd95wcrubm9nHvJEQs70rC0H/8omiSGGpU4FQ/ZA1URIqD4pjmFJh2Mfv1yH1eHgJDWTi2hMDXwTET+zOOyg=="
"resolved": "6.0.10",
"contentHash": "NSB0kDipxn2ychp88NXWfFRFlmi1bst/xynOutbnpEfRCT9JZkZ7KOmF/I/hNKo2dILiMGnqblm+j1sggdLB9g==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encodings.Web": "6.0.0"
}
},
"System.Threading": {
"type": "Transitive",
Expand Down Expand Up @@ -669,7 +680,7 @@
"stryker": {
"type": "Project",
"dependencies": {
"Azure.Storage.Files.Shares": "[12.19.1, )",
"Azure.Storage.Files.Shares": "[12.20.1, )",
"Buildalyzer": "[7.1.0, )",
"DotNet.Glob": "[3.1.3, )",
"Grynwald.MarkdownGenerator": "[3.0.106, )",
Expand Down Expand Up @@ -745,12 +756,12 @@
},
"Azure.Storage.Files.Shares": {
"type": "CentralTransitive",
"requested": "[12.19.1, )",
"resolved": "12.19.1",
"contentHash": "ezJZYp+B+ggcVq2SSdKV+X1mwNOdcpRhj/1+wucu81MPspCryVc3Lo/SmvmiYcttgbu0rYgdmh2uxCU/8N2sPw==",
"requested": "[12.20.1, )",
"resolved": "12.20.1",
"contentHash": "Ovds3flK+t+evPRPNGGU5l4irhIcvhAqyDAcr6E3dXHvidJrdllNSaGSj+v36rIzcivIS4bCDKy390RRnBRScQ==",
"dependencies": {
"Azure.Storage.Common": "12.20.1",
"System.Text.Json": "4.7.2"
"Azure.Storage.Common": "12.21.1",
"System.Text.Json": "6.0.10"
}
},
"Buildalyzer": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,37 +178,37 @@ public async Task Save_Report(int folders, int files)
var shareClient = Mock.Of<ShareClient>();
var logger = Mock.Of<ILogger<AzureFileShareBaselineProvider>>();

Mock.Get(shareClient).Setup(d => d.Exists(default)).Returns(Response.FromValue(true, default));
Mock.Get(shareClient).Setup(d => d.Exists(default)).Returns(Response.FromValue(true, Mock.Of<Response>(r => r.Status == 200)));
Mock.Get(shareClient).SetupGet(s => s.Uri).Returns(new Uri(_uri));

// root directory
var directoryClient = Mock.Of<ShareDirectoryClient>();
Mock.Get(shareClient)
.Setup(s => s.GetDirectoryClient("StrykerOutput"))
.Returns(directoryClient);
Mock.Get(directoryClient).Setup(d => d.CreateIfNotExists(default, default, default, default))
.Callback(() => Mock.Get(directoryClient).Setup(d => d.Exists(default)).Returns(Response.FromValue(true, default)));
Mock.Get(directoryClient).Setup(d => d.CreateIfNotExists(default, default))
.Callback(() => Mock.Get(directoryClient).Setup(d => d.Exists(default)).Returns(Response.FromValue(true, Mock.Of<Response>(r => r.Status == 200))));

// version directory
var subdirectoryClient = Mock.Of<ShareDirectoryClient>();
Mock.Get(directoryClient).Setup(d => d.GetSubdirectoryClient("v1")).Returns(subdirectoryClient);
Mock.Get(subdirectoryClient)
.Setup(d => d.CreateIfNotExists(default, default, default, default))
.Callback(() => Mock.Get(subdirectoryClient).Setup(d => d.Exists(default)).Returns(Response.FromValue(true, default)));
.Setup(d => d.CreateIfNotExists(default, default))
.Callback(() => Mock.Get(subdirectoryClient).Setup(d => d.Exists(default)).Returns(Response.FromValue(true, Mock.Of<Response>(r => r.Status == 200))));

// report file
var report = JsonReport.Build(new StrykerOptions(), ReportTestHelper.CreateProjectWith(folders: folders, files: files), It.IsAny<TestProjectsInfo>());
var fileLength = Encoding.UTF8.GetBytes(report.ToJson()).Length;

var fullChunks = (int)Math.Floor((double)fileLength / chunkSize);
var lastChunkSize = fileLength - fullChunks * chunkSize;
var lastChunkSize = fileLength - (fullChunks * chunkSize);

var fileClient = Mock.Of<ShareFileClient>();

Mock.Get(subdirectoryClient).Setup(d => d.GetFileClient("stryker-report.json")).Returns(fileClient);
Mock.Get(fileClient)
.Setup(f => f.CreateAsync(fileLength, default, default, default, default, default, default))
.Returns(Task.FromResult(Response.FromValue(Mock.Of<ShareFileInfo>(), Mock.Of<Response>())));
.Setup(f => f.CreateAsync(fileLength, default, default, default))
.Returns(Task.FromResult(Response.FromValue(Mock.Of<ShareFileInfo>(), Mock.Of<Response>(r => r.Status == 200))));

if (fullChunks > 0)
{
Expand All @@ -220,23 +220,23 @@ public async Task Save_Report(int folders, int files)
.Setup(f => f.UploadRangeAsync(
It.Is<HttpRange>(r => r.Offset == offset && r.Length == chunkSize),
It.IsAny<Stream>(), null, default))
.Returns(Task.FromResult(Response.FromValue(Mock.Of<ShareFileUploadInfo>(), Mock.Of<Response>())));
.Returns(Task.FromResult(Response.FromValue(Mock.Of<ShareFileUploadInfo>(), Mock.Of<Response>(r => r.Status == 200))));
}

// setup last chunk upload
Mock.Get(fileClient)
.Setup(f => f.UploadRangeAsync(
It.Is<HttpRange>(r => r.Offset == fullChunks * chunkSize && r.Length == lastChunkSize),
It.IsAny<Stream>(), null, default))
.Returns(Task.FromResult(Response.FromValue(Mock.Of<ShareFileUploadInfo>(), Mock.Of<Response>())));
.Returns(Task.FromResult(Response.FromValue(Mock.Of<ShareFileUploadInfo>(), Mock.Of<Response>(r => r.Status == 200))));
}
else // There's only 1 chunk
{
Mock.Get(fileClient)
.Setup(f => f.UploadRangeAsync(
It.Is<HttpRange>(r => r.Offset == 0 && r.Length == fileLength),
It.IsAny<Stream>(), null, default))
.Returns(Task.FromResult(Response.FromValue(Mock.Of<ShareFileUploadInfo>(), Mock.Of<Response>())));
.Returns(Task.FromResult(Response.FromValue(Mock.Of<ShareFileUploadInfo>(), Mock.Of<Response>(r => r.Status == 200))));
}

// Act
Expand Down
Loading

0 comments on commit 67bf892

Please sign in to comment.