summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* test: Add tests that bzr workspace initialization acts as expectedJonathan Maw2018-02-121-0/+19
|
* Add integration tests for edge cases involving symlinks and overlapsSam Thursfield2018-02-125-0/+152
|
* Add test for project-specific artifact shares with junctionsJürg Billeter2018-02-0810-0/+121
|
* Add junction testsJürg Billeter2018-02-0847-0/+435
|
* Pass Project instance to LoaderJürg Billeter2018-02-085-23/+26
| | | | Project access will be required for junctions.
* Move cli_options from Context to ProjectJürg Billeter2018-02-086-11/+11
| | | | cli_options are project-specific.
* Add workspace mount integration test175-refactor-integration-testsTristan Maat2018-02-073-0/+50
|
* Merge integration tests into general testsTristan Maat2018-02-0730-2/+903
|
* Add bzr testTristan Maat2018-02-073-0/+49
|
* Add test utilities for integration testsTristan Maat2018-02-073-25/+131
|
* runcli.py: Allow setting individual config settingsTristan Maat2018-02-071-4/+8
|
* tests/frontend/overlaps.py: Add test for runtime dependency stagingJürg Billeter2018-02-072-0/+19
| | | | This test covers #225.
* tests/cachekey: Updating cache key test for new artifact versioncache-keys-os-archTristan Van Berkom2018-02-0724-24/+24
|
* Add tests for workspace config format conversionChandan Singh2018-02-051-0/+54
|
* tests: Add overlap testsJonathan Maw2018-01-2518-15/+125
|
* tests: Move test_overlaps test filesJonathan Maw2018-01-255-4/+5
| | | | | This was done so that the files can be re-used with different project.conf.
* tests: Remove stray printing during overlap testJonathan Maw2018-01-251-1/+0
|
* tests/frontend/pull.py: Add track+pull test for non-strict build planJürg Billeter2018-01-231-0/+44
|
* tests/frontend/pull.py: Add pull test for non-strict build planJürg Billeter2018-01-231-0/+51
|
* Make artifact cache tests work in python3.4jonathan/fix-tests-python34Jonathan Maw2018-01-121-3/+3
| | | | | | | | A LocalPath was being passed into os.path.isabs, which failed when it tried to call the path's startswith method. Converting it to a string before using _yaml.dump seemed to solve the problem.
* tests: Exercise the new multiple cache supportSam Thursfield2018-01-115-132/+248
| | | | | | | | | | | This adds a new test for parsing artifact cache configuration, which calls the helper function from the 'artifactcache' module directly rather than trying to assert based on blind push and pull commands whether or not we got the complex precedence rules exactly right. This means frontend push/pull tests no longer need to be so thorough about testing precedence but they are instead expanded to assert that multiple caches work correctly.
* Add support for multiple remote cachesSam Thursfield2018-01-114-55/+47
| | | | | | | | | | | | | | | | | | | | | | This extends the 'artifacts' configuration block such that a list of `url` mappings can be given instead of a single entry. For example: artifacts: - url: http://example.com/artifacts1 - url: ssh://ostree@example.com/artifacts2 The OSTreeCache class is updated to set up multiple remotes and query remote refs from all of them. There are no automated tests for this yet. Empty URLs ('') now raise an exception. They cause breakages internally if we allow them through, and they can only occur if the user or our tests are misconfiguring things somehow. We report failure to fetch from the cache by printing a message to stderr for now. This is because BuildStream's actual logging functionality can't be used during frontend init -- see issue #168.
* tests/frontend: Assert cached state in a single lineSam Thursfield2018-01-112-16/+8
| | | | | Minor tweak to hopefully make the test cases a bit shorter and more readable, in preparation for adding more.
* tests/cachekey/cachekey.py: Manually create a symlink for our testsTristan Van Berkom2018-01-101-0/+10
| | | | | | | | This works around an inconsistent behavior with setuptools. Newer versions of setuptools fail to preserve symbolic links when creating a source distribution, meaning that tests run from the dist tarball will fail.
* tests/cachekey: Enhanced tests to consider local sources with multiple files.Tristan Van Berkom2018-01-1016-13/+16
| | | | | | | We had a cache key instability issue with local sources generating inconsistent cache keys due to iterating over their files in a random order. Tests did not catch this previously due to the local source sample only using one file to iterate over.
* tests/pipeline/preflight.py: Added test to ensure graceful exit at preflight ↵fix-preflight-errorsTristan Van Berkom2018-01-065-0/+69
| | | | error time
* local & patch source tests: Preflight errors now report PipelineErrorTristan Van Berkom2018-01-062-3/+3
|
* tests/testutils/runcli.py: Assert that buildstream actually exited.Tristan Van Berkom2018-01-061-0/+12
| | | | | | Enhanced the error checking Result() methods to always assert that the CLI actually exited, there are no cases worth testing for where buildstream would be expected to exit on an unhandled exception.
* tests/pipeline/load.py: Removing unused tmpdir fixture from hereTristan Van Berkom2018-01-061-7/+7
|
* test/utils/savefile.py: Stringify the tmpdir so that tests work.fix-savefile-test-brokenTristan Van Berkom2018-01-061-9/+9
| | | | | | | | | It looks like this newly added test assumes the user has a very recent version of pytest, which supports treating the `tmpdir` fixture like a string. A reasonable alternative to this patch would be require at minimum a version of pytest which supports this newly introduced API.
* utils.py: Add save_file_atomic() helperSam Thursfield2018-01-042-0/+62
| | | | | | | | | | | | This is a context manager that can be used to divert file writes into a temporary file, which is then renamed into place once writing is complete. It is primarily intended for use by source plugins which download files, so they can ensure that their downloads appear atomic and there is no risk of leaving half-downloaded files in the cache. So far this is not used in the core, but it is needed by the Docker source plugin that is proposed for the bst-external plugins repo. See: https://gitlab.com/BuildStream/bst-external/merge_requests/9
* tests/sources/local.py: Adding test for staging a symlink.Tristan Van Berkom2018-01-024-0/+34
| | | | | This has remained without test coverage mostly due to upstream pytest-datafiles bug https://github.com/omarkohl/pytest-datafiles/issues/1
* tests/sources/local.py: Testing failures to create staging directoriesTristan Van Berkom2018-01-024-0/+28
| | | | | | | | Seems that local.py is an appropriate plugin to use for testing errors which originate from the abstract Source class. This test checks that we raise the appropriate error in the case that we attempt to stage to a directory that is a regular file.
* tests/frontend: Updating tests to use new error checksTristan Van Berkom2018-01-0112-57/+50
| | | | | This also fixes #177 - the problem here was solved simply by passing the project directory to `cli.run(project=project...)`
* tests/format: Use new error assertions all aroundTristan Van Berkom2018-01-0111-120/+50
|
* tests/cachekey/cachekey.py: Use new error checkingTristan Van Berkom2018-01-011-5/+1
|
* tests/sources: Use new error checking tools for source testsTristan Van Berkom2018-01-016-82/+91
| | | | | | Also added a test case for the `patch` plugin which checks for graceful failure when the specified patch file is not a regular file (but a block device or a named pipe instead).
* tests/testutils/runcli.py: Augment the Result object to store task errorsTristan Van Berkom2018-01-011-9/+100
| | | | | | | | | | | | Before this, we only stored the last exception to have been raised in the main process, now we additionally provide some Result members allowing tests to inspect a machine readable error `domain` and `reason` describing why a task has "failed". This adds some new APIs to the Result() object for tests: assert_main_error() - asserts the nature of the main buildstream error assert_task_error() - asserts the nature of the error from a child task
* Fixing tests to adapt to new setup of ProgramNotFound exceptionTristan Van Berkom2017-12-202-6/+4
|
* project: Rename required-project-version to format-versionJonathan Maw2017-12-141-1/+1
|
* tests: Test whether a plugin is allowed to be loadedfix-132-rebasedJonathan Maw2017-12-1311-1/+62
|
* Update tests for changed plugin loadingJonathan Maw2017-12-1317-103/+225
| | | | | | Checking for plugins with the same name no longer happens in the plugincontext, it happens in project, so the old test was removed and a new one added.
* Adapting test cases to expect logs in stderrTristan Van Berkom2017-12-139-38/+27
| | | | And also adapted them to remove any occurrences of HAVE_ROOT.
* tests/testutils/site.py: Removed HAVE_ROOTTristan Van Berkom2017-12-131-2/+0
| | | | | There is no scenario worth testing where this condition is not true, removing this.
* tests/testutils/runcli.py: Enhanced to capture stdout/stderr separatelyTristan Van Berkom2017-12-131-11/+64
| | | | | We need this now in order to properly test the frontend and parse logs from stderr or output from stdout.
* Fix testsTristan Maat2017-12-138-2/+357
|
* tests/testutils/artifactshare.py: Always create summary file for test cachesSam Thursfield2017-12-121-0/+1
| | | | | | | | Pulls will fail from the cache if there's no summary file, so we should always create one. If you need a cache that breaks when pulled from, pass an empty directory that hasn't been initialized as a repo at all.
* tests/frontend: Reverse ordering of cache specificationsSam Thursfield2017-12-122-14/+14
| | | | | | | | | | | The cache parameters are now in highest-to-lowest precidence order corresponding to left-to-right along the line where they are specified. Once we make it possible to specify a list of URLs for each of these parameters, the precidence will continue to always read from highest to lowest corresponding to left-to-right since each list of URLs will also read left-to-right.
* Remove unused imports in test filesGökçen Nurlu2017-12-0717-22/+2
|
* tests/frontend/buildcheckout.py: Adding `bst checkout` testsTristan Van Berkom2017-12-051-5/+91
| | | | | | | | | o Test that we fail gracefully when there is already data in the checkout target o Test that we still checkout into dirty directories with --force o Test hardlink checkouts