• Sandeep Sukhani's avatar
    [MM-13828] Initialize tests in each package with a new temp folder with all test resources (#10261) · 29060acb
    Sandeep Sukhani authored
    * [MM-13828] Running tests from a new temp folder with all test resources
    Possible fix for #10132
    All packages which have a TestMain and use testlib.MainHelper will have a new current working directory which will have all the test
    resources copied.
    Note: default.json is copied as config.json as well to make sure tests don't have any impact due to changes in config by devs
    * [MM-13828] Added TestMain to remaining packages to use testlib.MainHelper
    This makes sure tests from all packages run with same test resources, setup in a new temp folder for each package
    * Updated Jenkins file to not not config/default.json
    This makes sure CI has same config files as a dev's machine
    * [MM-13828] Changes requested from code review
    Added accessor methods to testlib.MainHelper for accessing members
    Fixed some broken tests due to change in cwd while tests run
    Some other code refactoring and improvements
    * [MM-13828] Added new factory method with options for creating test main helper and some code refactoring
    testlib.NewMainHelperWithOptions supports options to turn on/off test dependencies and environment setup
    Some other code refactoring
    * Exporting members of testlib.MainHelper to make enterprise tests work
    * Fixed gofmt error
    * [MM-13828] removed unwanted dependency on plugins directory while setting up test resources
    * [MM-13828] Fixed some tests failing due to them being running from temp folder
    * [MM-13828] Some code changes suggested in PR review
    * Fixed gofmt error
main_test.go 461 Bytes