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

Adds LicensingService #40

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Remove Extra Space

04c405f
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Draft

Adds LicensingService #40

Remove Extra Space
04c405f
Select commit
Loading
Failed to load commit list.
GitHub Actions / Test Results succeeded Nov 7, 2024 in 1s

58 passed, 0 failed and 2 skipped

Tests passed successfully

Report Passed Failed Skipped Time
extensions/Bitwarden.Core/tests/TestResults/test-results.trx 3โœ… 9s
extensions/Bitwarden.Extensions.Configuration/tests/TestResults/test-results.trx 2โšช 9s
extensions/Bitwarden.Extensions.Hosting/tests/TestResults/test-results.trx 55โœ… 16s

โœ…ย extensions/Bitwarden.Core/tests/TestResults/test-results.trx

3 tests were completed in 9s with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Bitwarden.Core.Tests.AccessTokenTests 1โœ… 24ms
Bitwarden.Extensions.Configuration.Tests.AccessTokenTests 1โœ… 11ms
Bitwarden.Extensions.Configuration.Tests.EncryptedStringTests 1โœ… 21ms

โœ…ย Bitwarden.Core.Tests.AccessTokenTests

โœ… Test

โœ…ย Bitwarden.Extensions.Configuration.Tests.AccessTokenTests

โœ… StretchKey_Works

โœ…ย Bitwarden.Extensions.Configuration.Tests.EncryptedStringTests

โœ… Decrypt_Works

โœ…ย extensions/Bitwarden.Extensions.Configuration/tests/TestResults/test-results.trx

2 tests were completed in 9s with 0 passed, 0 failed and 2 skipped.

Test suite Passed Failed Skipped Time
Bitwarden.Extensions.Configuration.Tests.SecretsManagerConfigurationProviderTests 2โšช 2ms

โœ…ย Bitwarden.Extensions.Configuration.Tests.SecretsManagerConfigurationProviderTests

โšช Load_Reload_Works
โšช Load_Simple_Works

โœ…ย extensions/Bitwarden.Extensions.Hosting/tests/TestResults/test-results.trx

55 tests were completed in 16s with 55 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Bitwarden.Extensions.Hosting.Tests.Features.FeatureApplicationBuilderExtensionsTests 1โœ… 536ms
Bitwarden.Extensions.Hosting.Tests.Features.FeatureCheckMiddlewareTests 11โœ… 2s
Bitwarden.Extensions.Hosting.Tests.Features.FeatureEndpointConventionBuilderExtensionsTests 3โœ… 17ms
Bitwarden.Extensions.Hosting.Tests.Features.FeatureServiceCollectionExtensionsTests 4โœ… 146ms
Bitwarden.Extensions.Hosting.Tests.Features.LaunchDarklyFeatureServiceTests 11โœ… 694ms
Bitwarden.Extensions.Hosting.Tests.Licensing.DefaultLicensingServiceTests 7โœ… 789ms
Bitwarden.Extensions.Hosting.Tests.Licensing.PostConfigureLicensingOptionsTests 6โœ… 12s
Bitwarden.Extensions.Hosting.Tests.SelfHostedAttributeTests 4โœ… 604ms
Bitwarden.Extensions.Hosting.Tests.Utilities.VersionInfoTests 8โœ… 4ms

โœ…ย Bitwarden.Extensions.Hosting.Tests.Features.FeatureApplicationBuilderExtensionsTests

โœ… UseFeatureFlagChecks_RegistersMiddleware

โœ…ย Bitwarden.Extensions.Hosting.Tests.Features.FeatureCheckMiddlewareTests

โœ… FailedCheck_ReturnsProblemDetails
โœ… HasMetadata_AllMustBeTrue(metadata: [], expectedStatusCode: 200)
โœ… HasMetadata_AllMustBeTrue(metadata: [Flag = configured-false, Flag = configured-false], expectedStatusCode: 404)
โœ… HasMetadata_AllMustBeTrue(metadata: [Flag = configured-false], expectedStatusCode: 404)
โœ… HasMetadata_AllMustBeTrue(metadata: [Flag = configured-true, Flag = configured-false], expectedStatusCode: 404)
โœ… HasMetadata_AllMustBeTrue(metadata: [Flag = configured-true, Flag = configured-true], expectedStatusCode: 200)
โœ… HasMetadata_AllMustBeTrue(metadata: [Flag = configured-true], expectedStatusCode: 200)
โœ… HasMetadata_AllMustBeTrue(metadata: [Flag = not-configured], expectedStatusCode: 404)
โœ… NoCheck_CallsEndpoint
โœ… NoEndpointInvokesPipeline
โœ… SuccessfulCheck_CallsEndpoint

โœ…ย Bitwarden.Extensions.Hosting.Tests.Features.FeatureEndpointConventionBuilderExtensionsTests

โœ… RequireFeature_ChainedCall
โœ… RequireFeature_WithCallback
โœ… RequireFeature_WithFeatureKey

โœ…ย Bitwarden.Extensions.Hosting.Tests.Features.FeatureServiceCollectionExtensionsTests

โœ… AddFeatureFlagValues_MultipleTimes_AddMoreAndOverwritesExisting
โœ… AddFeatureFlagValues_Works
โœ… AddKnownFeatureFlags_MultipleTimes_AddsAll
โœ… AddKnownFeatureFlags_Works

โœ…ย Bitwarden.Extensions.Hosting.Tests.Features.LaunchDarklyFeatureServiceTests

โœ… GetAll
โœ… GetAll_OnlyReturnsKnownFlags
โœ… GetIntVariation_PassesAlongDetails(defaultValue: -1)
โœ… GetIntVariation_PassesAlongDetails(defaultValue: 0)
โœ… GetIntVariation_PassesAlongDetails(defaultValue: 2147483647)
โœ… GetStringVariation_PassesAlongDetails(defaultValue: "")
โœ… GetStringVariation_PassesAlongDetails(defaultValue: "test")
โœ… GetStringVariation_PassesAlongDetails(defaultValue: null)
โœ… IsEnabled_MultipleCalls_BuildsContextOnce
โœ… IsEnabled_PassesAlongDetails(defaultValue: False)
โœ… IsEnabled_PassesAlongDetails(defaultValue: True)

โœ…ย Bitwarden.Extensions.Hosting.Tests.Licensing.DefaultLicensingServiceTests

โœ… CreateLicense_WithSelfHost_Fails
โœ… RoundTrip_Expired_Fails
โœ… RoundTrip_Works
โœ… SignedWithAlternateKey_Fails
โœ… SignedWithMainKey_VerifyingWithAlternateKey_Fails
โœ… VerifyLicenseAsync_DifferentCloudHost_Fails
โœ… VerifyLicenseAsync_DifferentProduct_Fails

โœ…ย Bitwarden.Extensions.Hosting.Tests.Licensing.PostConfigureLicensingOptionsTests

โœ… PostConfigure_InBlob_CustomOptions_RetrievesCertFromBlob
โœ… PostConfigure_InBlob_RetrievesCertFromBlob
โœ… PostConfigure_NoBlobConfigured_InStore_Development_LoadsStoreCert
โœ… PostConfigure_NoBlobConfigured_InStore_Production_LoadsStoreCert
โœ… PostConfigure_NoBlobConfigured_NotInStore_LoadsDevCert
โœ… PostConfigure_NoBlobConfigured_NotInStore_LoadsProductionCert

โœ…ย Bitwarden.Extensions.Hosting.Tests.SelfHostedAttributeTests

โœ… NotSelfHosted_Success_When_NotSelfHosted
โœ… NotSelfHosted_Throws_When_SelfHosted
โœ… SelfHosted_Success_When_SelfHosted
โœ… SelfHosted_Throws_When_NotSelfHosted

โœ…ย Bitwarden.Extensions.Hosting.Tests.Utilities.VersionInfoTests

โœ… TryParse_Fails(input: "")
โœ… TryParse_Fails(input: "1.0.0+")
โœ… TryParse_Fails(input: "1.0.0+af18")
โœ… TryParse_Fails(input: "1.0.0+XXXXXXX")
โœ… TryParse_Fails(input: null)
โœ… TryParse_Works(input: "1.0.0", version: "1.0.0", gitHash: null)
โœ… TryParse_Works(input: "1.0.0+af18b", version: "1.0.0", gitHash: "af18b")
โœ… TryParse_Works(input: "1.0.0+af18b2952b5ddf910bd2f729a7c89a04b8d67084", version: "1.0.0", gitHash: "af18b2952b5ddf910bd2f729a7c89a04b8d67084")