Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

functional: support testing multiple units #1552

Closed

Commits on Apr 14, 2016

  1. functional: define UnitFileState for handling output of list-unit-files

    In addition to the existing UnitState, define UnitFileState to parse
    output of fleetctl list-unit-files, as well as its parse function
    ParseUnitFileStates(). The existing ParseUnitStates() parses Name,
    State, and Machine, including specific handling of machine strings.
    In contrast, ParseUnitFileStates() simply parses 3 fields: Name,
    DesiredState, and State.
    Dongsu Park committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    30c3082 View commit details
    Browse the repository at this point in the history
  2. functional: add new cluster operations WaitForNUnits and WaitForNUnit…

    …Files
    
    WaitForNUnits() runs fleetctl list-units to get a map of []UnitState
    (unit, active, machine). This operation should be called after fleetctl
    load or start.
    
    WaitForNUnitFiles() runs fleetctl list-unit-files to get a map of
    []UnitFileState (unit, desiredstate, state). This operation should be
    called after fleetctl submit.
    Dongsu Park committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    ea71b5a View commit details
    Browse the repository at this point in the history
  3. functional: introduce a new test TestUnitCat for fleetctl cat

    A new functional test TestUnitCat simply tests if "fleetctl cat" works.
    Dongsu Park committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    0a5bee7 View commit details
    Browse the repository at this point in the history
  4. functional: introduce a new test TestUnitStatus

    TestUnitStatus simply checks if "fleetctl status hello.service" works.
    Dongsu Park committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    24f2da0 View commit details
    Browse the repository at this point in the history
  5. functional: make TestUnitSubmit() use cluster.WaitForNUnitFiles

    Improve TestUnitSubmit() like the following:
    * use list-unit-files instead of list-units, to correctly verify
      submitted units.
    * check that the output of list-unit-files contains the correct
      unit name, with help of a new helper cluster.WaitForNUnitFiles.
      That way the whole functional test could become less racy.
    Dongsu Park committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    64863ee View commit details
    Browse the repository at this point in the history
  6. functional: a new test TestUnitLoad to check fleetctl {load,unload}

    A new test TestUnitLoad verifies that "fleetctl {load,unload}"
    correctly works: load -> list-units -> unload -> list-units -> load
    Dongsu Park committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    7bcdb51 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2016

  1. functional: make TestUnitSubmit capable of processing multiple units

    Make testUnitSubmit() capable of testing submission of multiple units.
    It processes multiple units with different names, and verify that they
    are submitted. After redestroying all submitted units, it checks for
    every unit being completely removed, making use of cluster operations.
    These are implemented in doMultipleUnitsCmd() to be used for further
    tests like TestUnitLoad or TestUnitStart.
    Dongsu Park committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    6724258 View commit details
    Browse the repository at this point in the history
  2. functional: make TestUnitLoad use doMulitpleUnitsCmd

    Make TestUnitLoad depend on doMulitpleUnitsCmd() to reuse common
    code parts. Also make the test load & unload multiple units.
    Dongsu Park committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    a7ce09e View commit details
    Browse the repository at this point in the history
  3. functional: make TestUnitStart also depend on doMultipleUnitsCmd

    Rename TestUnitRestart to TestUnitStart for consistency with other ones.
    Make TestUnitStart depend on doMulitpleUnitsCmd() to reuse common
    code parts. Also make the test start & stop multiple units.
    Dongsu Park committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    4c276d6 View commit details
    Browse the repository at this point in the history