Uploaded image for project: 'GPII - Global Public Inclusive Infrastructure'
  1. GPII - Global Public Inclusive Infrastructure
  2. GPII-3422

Mock "noSettingsHandler" does not provide correct responses


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Settings Handlers
    • Labels:


      The mock "gpii.settingsHandlers.noSettings" handler that we have used to stub out various non-existent solutions does not provide a proper payload response to its "set" method, with the expected "newValue"/"oldValue" fields. As a result, any such solution does not end up represented within the session state, and i) the metrics code at https://github.com/GPII/universal/blob/master/gpii/node_modules/eventLog/src/metrics.js#L186 logs a failure (note that this code should be fixed to use the existing userErrors notification), and ii) because there is no corresponding session state, no control is emitted in the PSP etc.

      We should fix this code up so that at least it results in a payload return good enough to generate the correct session state. Depending on the quality of implementation required, we could also improve it so that it provides correct information on a "get" request which has not been implemented at all - this will be necessary once we start doing any snapshotting on startup. This would require some extra information encoded in the "options" block of the settingsHandler to key the block of storage used to encode the current value of the setting.




            • Assignee:
              jhernandez Javier Hernández
              amb26 Antranig Basman
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: