hcsshim/pkg/cimfs
Hamza El-Saawy 523fe7ba24
Functional test housekeeping (#1964)
Remove unused/legacy functional test flags/environment variables.

Unify [TestMain] control flow, so there is only one exit call, and
`defer` is used to run cleanup after the tests are run.

Standardize UVM `default[L|W]COWOptions` to accept a context, and add
context parameter to `namespacedContext`

Remove all build tags aside from `functional`, since features are used
to select the tests to run. This standardizes the functional tests with
the cri-containerd tests, even though the feature names themselves are
different.

Add `test/pkg/uvm.CreateWCOW` function to mirror `CreateLCOW`, and add
`Create` and `CreateAndStart` functions that pick LCOW or WCOW based on
the options provided.

Have uVM scratch and image layers be created under a dedicated and
persisted folder within `%TEMP%` that is excluded from Windows defender.
(The folder will be removed during OS restart, regardless of contents.)

Remove copied OCI spec options from `test/internal/oci`, add new
options for creating HostProcess containers.

Add a `internal\sync.OnceValue`(`Ctx`) function that mirrors
`sync.OnceValues` (introduced in go1.21) to have a type-safe `Once`
function.

Check that required privileges are held (only once) when unpacking
Windows layers.

Fix LCOW tests in `lcow_test.go` that were setting `KernelDirect`
without also updating `KernelFile`.

Add `util.Context` function to create context that times out before test
timeout, to help with timing issues and allow time for cleanup and
logging.

Rename `cri_util` to `criutil`, since underscores are frowned upon in
package names.
Add a `test` prefix to `github.com/Microsoft/hcsshim/test/pkg/*` and
`github.com/Microsoft/hcsshim/test/internal/*` imports to be consistent
across all `test/functional/*` files.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
2024-03-07 15:54:14 -05:00
..
format Update build tags, lint entire repo for Linux (#1968) 2023-11-13 16:13:18 -05:00
cim_test.go Functional test housekeeping (#1964) 2024-03-07 15:54:14 -05:00
cim_writer_windows.go Minor CimFS bug fixes (#1980) 2023-12-20 08:17:29 -08:00
cimfs.go Minor CimFS bug fixes (#1980) 2023-12-20 08:17:29 -08:00
common.go Lint common error wrapping issues, update README (#1969) 2023-12-11 13:57:32 -05:00
doc.go Update build tags, lint entire repo for Linux (#1968) 2023-11-13 16:13:18 -05:00
mount_cim.go Update build tags, lint entire repo for Linux (#1968) 2023-11-13 16:13:18 -05:00