These scenarios are written for FeatureFlag but most of them apply to the KeyVault reference we should make sure behaviors are the same for both.
It might also be a good idea to codify these in tests.
Updating JSON via the value
- Get a feature flag using the client
- Set the Value to a feature-flag compatible JSON
- Save the feature flag
C#: works, stores the updated value
Java: works, stores the updated value
Python: works, stores updated value
JS: works, stores the updated value
Setting value to incompatible JSON
- Get a feature flag using the client
- Set the Value to "[]" JSON value (non-valid feature-flag body)
- Save the feature flag
C#: works, stores the updated value. The next load retrieves the setting as FeatureFlag but all strongly typed properties throw on access
Java: works, stores the udpated value Returns a ConfigurationSetting instead of a FeatureFlagConfigurationSetting
Python: works, stored updated value. Returns a ConfigurationSetting instead of a FeatureFlagConfigurationSetting
JS: works, stores the updated value, Next load - parseFeatureFlag throws since it can't be parsed
Settings value to non-JSON
- Get a feature flag using the client
- Set the Value to Hello world (no quotes)
- Save the feature flag
C#: works, stores the updated value. The next load retrieves the setting as FeatureFlag but all strongly typed properties throw on access
Java: works, stores the updated value. Returns a ConfigurationSetting instead of a FeatureFlagConfigurationSetting
Python: works, stored updated value. Returns a ConfigurationSetting instead of a FeatureFlagConfigurationSetting
JS: works, stores the updated value. Next load - parseFeatureFlag throws since it can't be parsed
Changing the strongly-typed properties after setting the value to non-valid feature flag
- Create a feature flag
- Set the Value to Hello world (no quotes)
- Set some strongly typed properties
C#: Value is updated. Strongly typed properties throw on access.
Java: value is updated Strongly typed properties throw on access.
Python: Value is updated. Properties throw ValueError on access.
JS: Value is updated. parseFeatureFlag throws since the value can't be parsed
Accessing strongly typed properties after setting a different feature flag JSON
- Create a feature flag
- Set the Value to some pre-populated
- Access strongly-typed property values
C#: Value is updated. Strongly typed properties return new values out of the parsed JSON
Java: value is updated. Strongly typed properties return new values out of the parsed JSON
Python: Value is updated, properties return new values out of the parsed JSON, returns None if it is not present.
JS: value is updated, parseFeatureFlag does parse the new value
Accessing value after changing strongly-typed properties.
- Create a feature flag
- Change a strongly-typed property
- Does the
Value reflect the change?
C#: Yes
Java: Yes
Python: Yes
JS: Yes
Create a FeatureFlag
- Create a feature flag
- Is featureFlag.Key prefixed with
".appconfig.featureflag/"?
C#: Yes
Java: Yes
Python: Yes
JS: Yes (if the user doesn't provide the prefix, the SDK adds it)
These scenarios are written for FeatureFlag but most of them apply to the KeyVault reference we should make sure behaviors are the same for both.
It might also be a good idea to codify these in tests.
Updating JSON via the value
C#: works, stores the updated value
Java: works, stores the updated value
Python: works, stores updated value
JS: works, stores the updated value
Setting value to incompatible JSON
C#: works, stores the updated value. The next load retrieves the setting as FeatureFlag but all strongly typed properties throw on access
Java: works, stores the udpated value Returns a
ConfigurationSettinginstead of aFeatureFlagConfigurationSettingPython: works, stored updated value. Returns a
ConfigurationSettinginstead of aFeatureFlagConfigurationSettingJS: works, stores the updated value, Next load - parseFeatureFlag throws since it can't be parsed
Settings value to non-JSON
C#: works, stores the updated value. The next load retrieves the setting as FeatureFlag but all strongly typed properties throw on access
Java: works, stores the updated value. Returns a
ConfigurationSettinginstead of aFeatureFlagConfigurationSettingPython: works, stored updated value. Returns a
ConfigurationSettinginstead of aFeatureFlagConfigurationSettingJS: works, stores the updated value. Next load - parseFeatureFlag throws since it can't be parsed
Changing the strongly-typed properties after setting the value to non-valid feature flag
C#: Value is updated. Strongly typed properties throw on access.
Java: value is updated Strongly typed properties throw on access.
Python: Value is updated. Properties throw
ValueErroron access.JS: Value is updated.
parseFeatureFlagthrows since the value can't be parsedAccessing strongly typed properties after setting a different feature flag JSON
C#: Value is updated. Strongly typed properties return new values out of the parsed JSON
Java: value is updated. Strongly typed properties return new values out of the parsed JSON
Python: Value is updated, properties return new values out of the parsed JSON, returns
Noneif it is not present.JS: value is updated,
parseFeatureFlagdoes parse the new valueAccessing value after changing strongly-typed properties.
Valuereflect the change?C#: Yes
Java: Yes
Python: Yes
JS: Yes
Create a FeatureFlag
".appconfig.featureflag/"?C#: Yes
Java: Yes
Python: Yes
JS: Yes (if the user doesn't provide the prefix, the SDK adds it)