Skip to content

Commit

Permalink
Update tar test data version (#77785)
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 authored Nov 3, 2022
1 parent 9b9aeaf commit 64b3ee4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>42999f1b16859553727672ef4087742aab7be681</Sha>
</Dependency>
<Dependency Name="System.Formats.Tar.TestData" Version="7.0.0-beta.22531.1">
<Dependency Name="System.Formats.Tar.TestData" Version="7.0.0-beta.22552.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>42999f1b16859553727672ef4087742aab7be681</Sha>
<Sha>a6e2984f63e3809fcdc607bc88bbf257a6c6b4e4</Sha>
</Dependency>
<Dependency Name="System.IO.Compression.TestData" Version="7.0.0-beta.22531.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<SystemRuntimeNumericsTestDataVersion>7.0.0-beta.22531.1</SystemRuntimeNumericsTestDataVersion>
<SystemComponentModelTypeConverterTestDataVersion>7.0.0-beta.22531.1</SystemComponentModelTypeConverterTestDataVersion>
<SystemDrawingCommonTestDataVersion>7.0.0-beta.22531.1</SystemDrawingCommonTestDataVersion>
<SystemFormatsTarTestDataVersion>7.0.0-beta.22531.1</SystemFormatsTarTestDataVersion>
<SystemFormatsTarTestDataVersion>7.0.0-beta.22552.1</SystemFormatsTarTestDataVersion>
<SystemIOCompressionTestDataVersion>7.0.0-beta.22531.1</SystemIOCompressionTestDataVersion>
<SystemIOPackagingTestDataVersion>7.0.0-beta.22531.1</SystemIOPackagingTestDataVersion>
<SystemNetTestDataVersion>7.0.0-beta.22531.1</SystemNetTestDataVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public async Task ExtractEntry_DockerImageTarWithFileTypeInDirectoriesInMode_Suc
{
using (TempDirectory root = new TempDirectory())
{
await using MemoryStream archiveStream = GetTarMemoryStream(CompressionMethod.Uncompressed, "golang_tar", "docker-hello-world");
await using MemoryStream archiveStream = GetTarMemoryStream(CompressionMethod.Uncompressed, "misc", "docker-hello-world");
await TarFile.ExtractToDirectoryAsync(archiveStream, root.Path, overwriteFiles: true);

Assert.True(File.Exists(Path.Join(root.Path, "manifest.json")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ public void Throw_SingleExtendedAttributesEntryWithNoActualEntry()
Assert.Throws<EndOfStreamException>(() => reader.GetNextEntry());
}

[Fact]
public void ReadDataStreamOfGoLangTarGzGnu()
{
using MemoryStream archiveStream = GetTarMemoryStream(CompressionMethod.GZip, "golang_tar", "pax-bad-hdr-large");
using GZipStream decompressor = new GZipStream(archiveStream, CompressionMode.Decompress);
VerifyDataStreamOfTarInternal(decompressor, copyData: false);
}

[Theory]
[InlineData("tar-rs", "spaces")]
[InlineData("golang_tar", "v7")]
Expand Down

0 comments on commit 64b3ee4

Please sign in to comment.