Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Vestris.ResourceLib to v2.2.0 #536

Merged
merged 3 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/WingetCreateCore/WingetCreateCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Octokit" Version="9.1.2" />
<PackageReference Include="Vestris.ResourceLib" Version="2.1.0" />
<PackageReference Include="Vestris.ResourceLib" Version="2.2.0" />
<PackageReference Include="WiX" Version="3.14.1" />
<PackageReference Include="YamlDotNet" Version="15.1.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Installers:
InstallerType: exe
InstallerSha256: A7803233EEDB6A4B59B3024CCF9292A6FFFB94507DC998AA67C5B745D197A5DC
ProductCode: FakeProductCode
PackageFamilyName: FakePackageFamilyName
PackageFamilyName: Fake.PackageFamilyName_8wekyb3d8bbwe
Platform:
- Windows.Desktop
PackageLocale: en-US
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,22 @@ public void TearDown()
/// </summary>
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
[Test]
public async Task UpdateCommandGitHubManifestTest()
public async Task UpdateAndVerifyManifestsCreated()
{
string installerUrl = $"https://fakedomain.com/{TestConstants.TestExeInstaller}";
TestUtils.InitializeMockDownloads(TestConstants.TestExeInstaller);

string packageIdentifier = "TestPublisher.SingleExe";
string version = "1.2.3.4";
(UpdateCommand command, var initialManifestContent) = GetUpdateCommandAndManifestData(TestConstants.TestPackageIdentifier, version, this.tempPath, null);
(UpdateCommand command, var initialManifestContent) = GetUpdateCommandAndManifestData(packageIdentifier, version, this.tempPath, new[] { $"{installerUrl}" });
var updatedManifests = await command.ExecuteManifestUpdate(initialManifestContent, this.testCommandEvent);
ClassicAssert.IsTrue(updatedManifests, "Command should have succeeded");

string manifestDir = Utils.GetAppManifestDirPath(TestConstants.TestPackageIdentifier, version);
string manifestDir = Utils.GetAppManifestDirPath(packageIdentifier, version);
var updatedManifestContents = Directory.GetFiles(Path.Combine(this.tempPath, manifestDir)).Select(f => File.ReadAllText(f));
ClassicAssert.IsTrue(updatedManifestContents.Any(), "Updated manifests were not created successfully");
Manifests manifestsToValidate = Serialization.DeserializeManifestContents(updatedManifestContents);
ClassicAssert.AreEqual(version, manifestsToValidate.VersionManifest.PackageVersion, $"Failed to update version of {TestConstants.TestPackageIdentifier}");
ClassicAssert.AreEqual(version, manifestsToValidate.VersionManifest.PackageVersion, $"Failed to update version of {packageIdentifier}");
}

/// <summary>
Expand Down Expand Up @@ -598,7 +602,7 @@ public async Task UpdatePreservesExistingValues()
ClassicAssert.IsNotNull(updatedManifests, "Command should have succeeded");
var updatedInstallerManifest = updatedManifests.InstallerManifest;
ClassicAssert.AreEqual("FakeProductCode", updatedInstallerManifest.ProductCode, "Existing value for ProductCode was overwritten.");
ClassicAssert.AreEqual("FakePackageFamilyName", updatedInstallerManifest.PackageFamilyName, "Existing value for PackageFamilyName was overwritten.");
ClassicAssert.AreEqual("Fake.PackageFamilyName_8wekyb3d8bbwe", updatedInstallerManifest.PackageFamilyName, "Existing value for PackageFamilyName was overwritten.");
ClassicAssert.IsNotNull(updatedInstallerManifest.Platform, "Existing value for Platform was overwritten.;");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@
<None Update="Resources\WingetCreateE2E.Yaml.MsiTest.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\TestPublisher.TestApp.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\TestPublisher.MultipleInstallerApp.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down