List and show- controllers update client store. #7806

Merged
merged 1 commit into from Aug 29, 2017

Conversation

Projects
None yet
3 participants
Member

anastasiamac commented Aug 29, 2017

Description of change

Both 'controllers --refresh' and 'show-controller' get full models list for a given controller. Use this as an opportunity to update client store.

Whilst the updates on th commands are straightforward, most of the movement proposed in this PR is in the test since tests were setup in such a way that client side store was re-used to supply data "coming" from the API. Here we separate API data from store data to check that the store is updated.

QA steps

  1. Bootstrap
  2. modify store file to contain some non-existent models
  3. Run 'controllers --refresh', check store has been updated to contain only existent models
  4. repeat step 2
  5. run 'show-controller' for bootstrapped model and check that the store has been updated correctly

Documentation changes

n/a - internal change

Bug reference

n/a

axw approved these changes Aug 29, 2017

@@ -82,14 +82,14 @@ controllers:
models:
controller:
uuid: ghi
- current-model: controller
@axw

axw Aug 29, 2017

Member

what necessitates this change? why is it OK for the model name above to be unqualified, but not current-model?

@anastasiamac

anastasiamac Aug 29, 2017

Member

This is the outdated test data. We will always store qualified name (and test entries for model names will be updated when store models get updated).

Comparison logic worked ok in tests because we have never written test store data through QualifyingClientStore. Since we update store now as part of running the commands, all model names will be qualified. For current model asterix to be displayed, current model names need to be qualified to start with, otherwise store update will remove them.

Member

anastasiamac commented Aug 29, 2017

$$merge$$

Contributor

jujubot commented Aug 29, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit fbb0094 into juju:develop Aug 29, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@anastasiamac anastasiamac deleted the anastasiamac:list-show-controllers-update-store branch Aug 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment