fix(feature_flags): Use ProjectFeatureFlagScopeOptions for FeatureFlagStrategyOptions.Scopes

Summary

Fixes the FeatureFlagStrategyOptions.Scopes type to use the correct options struct instead of the response struct, as part of the 3.0 breaking changes. Closes #2288

What changed

  • Changed FeatureFlagStrategyOptions.Scopes from *[]*ProjectFeatureFlagScope to *[]*ProjectFeatureFlagScopeOptions
  • Fixed ProjectFeatureFlagScopeOptions.EnvironmentScope url tag from id to environment_scope
  • Moved the Destroy field from ProjectFeatureFlagScope (response struct) to ProjectFeatureFlagScopeOptions (options struct)

Testing

  • Updated TestUpdateProjectFeatureFlag_ScopeDestroy and TestUpdateProjectFeatureFlag_ScopeCreate to use ProjectFeatureFlagScopeOptions with pointer fields
  • Removed environment_scope = "" from expected variables since that field is now omitted in the options struct due to the omitempty tag.
  • Side note: I noticed there is no test coverage for CreateProjectFeatureFlag, I can create a separate MR for that if it's a good idea

Merge request reports

Loading
Loading