aboutsummaryrefslogtreecommitdiff
path: root/tests/test_conda.c
Commit message (Collapse)AuthorAgeFilesLines
* base and "based_on" installations shall hardcode the requested python ↵Joseph Hunkeler2025-04-021-1/+1
| | | | version in the YAML config instead of trusting it
* Fix leaks in test_conda.cJoseph Hunkeler2025-02-121-1/+5
|
* Initialize structs to {0} and combine declaration and assignment where possibleJoseph Hunkeler2024-11-011-1/+5
|
* Generalize *_index_provides interfaceJoseph Hunkeler2024-10-241-11/+18
| | | | | * Replaces conda_* and pip_* with pkg_index_provides * Because this function can fail in so many ways I've added pkg_index_provides_strerror() and a detection macro PKG_INDEX_PROVIDES_FAILED() to make things easier
* Add tests:Joseph Hunkeler2024-10-211-2/+52
| | | | | | | | | | | | | * test_pip_index_provides * test_conda_provides * test_conda_get_active_environment * test_delivery_gather_tool_versions Fix tests: * global.sysconfdir duplicates the environment string * Use delivery_free() * Use globals_free()
* Change signature:Joseph Hunkeler2024-10-211-0/+7
| | | | * delivery_gather_tool_versions now returns non-zero if unable to determine a tool's version
* Fix includesJoseph Hunkeler2024-10-141-0/+2
|
* Refactor structureJoseph Hunkeler2024-09-201-2/+2
| | | | * Break delivery.c into smaller components
* Return of the INI refactor (#20)Joseph Hunkeler2024-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Continuation of #19 * Fixes always_update_base_environment override bug added by PR #19 * Finish type hinting implementation * ini_getval_* functions now able to affect rendering mode using INI_READ_RAW and INI_READ_RENDER * Created pointers to deeply nested structures to increase readability * Output from ini_write() is more consistent, with fewer errant spaces and line feeds * Fixes accidental regression in #19. INIVAL_TYPE_STR_ARRAY never produced an array of pointers to char. This needs to be corrected in the future. i.e. It has always generated a new-line delimited string, not a StrList, or array. * Fix strlist_append_tokenize * original pointer is no longer modified * token strings are stripped of leading space before appending to the list * Use defines instead of magic numbers * delivery_init: add render_mode argument * test_conda: Add render mode * test_ini: Add render mode * Only add conda packages and wheels to the image * docker images are saved to the packages directory and will be consumed by the image if present. * Render template variables after bootstrapping the delivery
* Unit tests (#12)Joseph Hunkeler2024-07-151-0/+181
* Change return value of conda_setup_headless() from void to int * Replace exit() with return; * Return early if unpacking the micromamba binary fails * Exit program when pointer to INIFILE is NULL. * Validation function cannot otherwise proceed * The way the logic is set up I've decided to duplicate the installation code for now until I find time to revise it * The only meaningful difference between a "fresh start" and reusing the conda installation is a rmtree(). * Exposes STASIS_DOWNLOAD_TIMEOUT environment variable * Sets the connection timeout for libcurl to 30, instead of 300. * Export ini_section_create() function * Add download() tests * Add conda_*() tests * Add boilerplate source file for test framework * Fixes segfault reported by @GeorgeJCleary (#10) * The key is now an array index. When key is -1, the env variable is not defined. * Free resources only when continue on error is disabled (#11) * Fix segfault due to premature shutdown/cleanup * If conda_setup_headless cannot succeed, die * Set STASIS_SYSCONFDIR for tests