Commit Graph

8 Commits

Author SHA1 Message Date
Jonathon Anderson
fbd5ca9895 Recommended refactors
- make sure spec sets new cache dir
- move clean out of api
- capture warewulfconf.Paths.Cachedir+"/warewulf" in once place
- split Clean() into multiple functions
- remove WriteFileAbs

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-28 15:20:41 -06:00
Christian Goll
ac6cd69ca6 fix test to run without NodeInfo
Also removed --fullall from node list and profile list

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30:47 -04:00
Jonathon Anderson
a1832ad8c1 Complete transfer of Warewulf from HPCng
Warewulf is now being maintained in its own GitHub organization at
github.com/warewulf

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-01-26 21:35:04 -07:00
Jonathon Anderson
2b49bcad27 Expand test descriptions and simplify some tests
As part of reviewing this PR, I expanded the test definitions to make it
easier to discern the intent of each test at a glance. In so doing I
understood most tests behaving as normal, but I did make a few small
changes:

- Some tests no longer produce any errors, so remove this variable from
  the test definitions.
- Replace comma-separated overlay definitions with explicit slices.
  Splitting comma-separated strings led to erroneous behavior where a
  null overlay list was processed as a single null overlay rather than
  an empty slice.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-25 22:35:49 -06:00
Christian Goll
767be4fd8c refactored util_test.go to test on real files
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-10-25 22:35:49 -06:00
Christian Goll
242276bba9 fixed tests and added explcit error handling
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-10-25 22:35:49 -06:00
Jonathon Anderson
42842aeee1 Format entire source code using make fmt
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-23 17:56:20 -06:00
Jonathon Anderson
9cf47da963 Fix warewulfd for new contextual overlay names
The recent PR #883 replaced the standard overlay naming convention with
static names for each of the runtime and wwinit/system contexts; but the
method by which it left the "legacy" naming convention in place led to a
bug where warewulfd was still attempting to serve overlays with the
previous naming convention, though this name wasn't being built.

This PR refactors contextual overlay image naming to be, I think, a more
typical golang pattern, and updates affected code to match.

This PR also included tests for all functions modified by this change.

Fixes #896

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-09-02 11:18:38 -06:00