1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

Removed SignatureBytes since it had only one usage

This commit is contained in:
Conner Turnbull
2025-06-05 15:25:33 -04:00
parent 6181d0961c
commit a7715632e7
4 changed files with 6 additions and 11 deletions

View File

@ -62,7 +62,7 @@ public class CloudGetOrganizationLicenseQueryTests
Assert.Equal(LicenseType.Organization, result.LicenseType);
Assert.Equal(organization.Id, result.Id);
Assert.Equal(installationId, result.InstallationId);
Assert.Equal(licenseSignature, result.SignatureBytes);
Assert.Equal(licenseSignature, Convert.FromBase64String(result.Signature));
Assert.Equal(string.Empty, result.Token);
}
@ -111,7 +111,7 @@ public class CloudGetOrganizationLicenseQueryTests
Assert.Equal(LicenseType.Organization, result.LicenseType);
Assert.Equal(organization.Id, result.Id);
Assert.Equal(installationId, result.InstallationId);
Assert.Equal(licenseSignature, result.SignatureBytes);
Assert.Equal(licenseSignature, Convert.FromBase64String(result.Signature));
Assert.Equal(DateTime.UtcNow.AddYears(1).Date, result.Expires!.Value.Date);
}
}

View File

@ -48,6 +48,7 @@ public class UpdateOrganizationLicenseCommandTests
license.Version = OrganizationLicense.CurrentLicenseFileVersion;
license.InstallationId = globalSettings.Installation.Id;
license.LicenseType = LicenseType.Organization;
license.SelfHost = true;
sutProvider.GetDependency<ILicensingService>().VerifyLicense(license).Returns(true);
sutProvider.GetDependency<ILicensingService>()
.GetClaimsPrincipalFromLicense(license)
@ -74,7 +75,7 @@ public class UpdateOrganizationLicenseCommandTests
await using var fs = File.OpenRead(filePath);
var licenseFromFile = await JsonSerializer.DeserializeAsync<OrganizationLicense>(fs);
AssertHelper.AssertPropertyEqual(license, licenseFromFile, "SignatureBytes");
AssertHelper.AssertPropertyEqual(license, licenseFromFile, "");
// Assertion: should have updated and saved the organization
// Properties excluded from the comparison below are exceptions to the rule that the Organization mirrors
@ -84,7 +85,7 @@ public class UpdateOrganizationLicenseCommandTests
.ReplaceAndUpdateCacheAsync(Arg.Is<Organization>(
org => AssertPropertyEqual(license, org,
"Id", "MaxStorageGb", "Issued", "Refresh", "Version", "Trial", "LicenseType",
"Hash", "Signature", "SignatureBytes", "InstallationId", "Expires",
"Hash", "Signature", "InstallationId", "Expires",
"ExpirationWithoutGracePeriod", "Token", "LimitCollectionCreationDeletion",
"LimitCollectionCreation", "LimitCollectionDeletion", "AllowAdminAccessToAllCollectionItems",
"UseOrganizationDomains", "UseAdminSponsoredFamilies") &&