• 
      

    Clean up config loading and testing.

    Review Request #9910 — Created May 4, 2018 and submitted

    Information

    rb-gateway
    master
    67786cf...

    Reviewers

    The way that the config was loaded was pretty ugly--we had two closely
    related structs, one of which was the serializable version, and one of
    which was exactly the same except instead of the serialized repository
    data, included Repository instances. This meant that adding any fields
    involved adding it in multiple places and copying it back and forth.

    This change merges those two, so that we load the data directly into the
    struct and then instantiate Repository instances later.

    I've also changed the testing to remove the ability to write out a
    config. We had been testing loading the config by first generating a
    Config struct and writing it to disk, then reading it back in and
    comparing. This was the only place that serialized the config, and made
    the test less isolated because it relied on both the serialization and
    deserialization to work correctly. I've changed this so that we just
    write out a JSON blob and then test that it can load correctly.

    • Ran unit tests.
    • Built and ran rb-gateway.
    chipx86
    1. Ship It!
    2. 
        
    brennie
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (70c32b4)