Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/cri-containerd/clone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/pkg/require"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)

Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/container_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"

"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/pkg/require"
)

var _containerBenchmarkTests = []struct {
Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/container_downlevel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"

"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/pkg/require"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)

Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/container_fileshare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"strings"
"testing"

"github.com/Microsoft/hcsshim/internal/hcs"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/pkg/definitions/hcs"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)

Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/container_gmsa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"
"testing"

"github.com/Microsoft/hcsshim/internal/hcs"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/pkg/definitions/hcs"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)

Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/container_layers_packing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/pkg/require"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/sirupsen/logrus"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"

"github.com/Microsoft/hcsshim/internal/guestpath"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/pkg/definitions/guestpath"
)

func runLogRotationContainer(t *testing.T, sandboxRequest *runtime.RunPodSandboxRequest, request *runtime.CreateContainerRequest, log string, logArchive string) {
Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/container_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/Microsoft/hcsshim/internal/memory"
"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/pkg/require"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)

Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/createcontainer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/Microsoft/hcsshim/internal/memory"
"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/pkg/require"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)

Expand Down
4 changes: 2 additions & 2 deletions test/cri-containerd/extended_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"fmt"
"testing"

"github.com/Microsoft/hcsshim/internal/extendedtask"
"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/pkg/definitions/extendedtask"
"github.com/Microsoft/hcsshim/test/pkg/definitions/shimdiag"
)

func getPodProcessorInfo(ctx context.Context, podID string) (*extendedtask.ComputeProcessorInfoResponse, error) {
Expand Down
4 changes: 2 additions & 2 deletions test/cri-containerd/helper_exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strings"
"testing"

"github.com/Microsoft/hcsshim/internal/cmd"
"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/test/pkg/definitions/cmd"
"github.com/Microsoft/hcsshim/test/pkg/definitions/shimdiag"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)

Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/helper_share_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package cri_containerd
import (
"context"

"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/test/pkg/definitions/shimdiag"
)

func shareInUVM(ctx context.Context, client shimdiag.ShimDiagService, hostPath, uvmPath string, readOnly bool) error {
Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/helper_update_utilities_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"testing"

"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/test/pkg/definitions/shimdiag"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)

Expand Down
4 changes: 2 additions & 2 deletions test/cri-containerd/jobcontainer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"

"github.com/Microsoft/hcsshim/hcn"
"github.com/Microsoft/hcsshim/internal/winapi"
"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/pkg/definitions/winapi"
"github.com/Microsoft/hcsshim/test/pkg/require"
)

func getJobContainerPodRequestWCOW(t *testing.T) *runtime.RunPodSandboxRequest {
Expand Down
28 changes: 14 additions & 14 deletions test/cri-containerd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"google.golang.org/grpc"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"

"github.com/Microsoft/hcsshim/test/internal/constants"
testflag "github.com/Microsoft/hcsshim/test/internal/flag"
"github.com/Microsoft/hcsshim/test/internal/require"
testflag "github.com/Microsoft/hcsshim/test/pkg/flag"
"github.com/Microsoft/hcsshim/test/pkg/images"
"github.com/Microsoft/hcsshim/test/pkg/require"

_ "github.com/Microsoft/hcsshim/test/internal/manifest"
_ "github.com/Microsoft/hcsshim/test/pkg/manifest"
)

const (
Expand Down Expand Up @@ -84,12 +84,12 @@ const (
var (
imageWindowsNanoserver = getWindowsNanoserverImage(osversion.Build())
imageWindowsServercore = getWindowsServerCoreImage(osversion.Build())
imageWindowsNanoserver17763 = constants.ImageWindowsNanoserver1809
imageWindowsNanoserver18362 = constants.ImageWindowsNanoserver1903
imageWindowsNanoserver19041 = constants.ImageWindowsNanoserver2004
imageWindowsServercore17763 = constants.ImageWindowsServercore1809
imageWindowsServercore18362 = constants.ImageWindowsServercore1903
imageWindowsServercore19041 = constants.ImageWindowsServercore2004
imageWindowsNanoserver17763 = images.ImageWindowsNanoserver1809
imageWindowsNanoserver18362 = images.ImageWindowsNanoserver1903
imageWindowsNanoserver19041 = images.ImageWindowsNanoserver2004
imageWindowsServercore17763 = images.ImageWindowsServercore1809
imageWindowsServercore18362 = images.ImageWindowsServercore1903
imageWindowsServercore19041 = images.ImageWindowsServercore2004
)

// Flags
Expand Down Expand Up @@ -165,20 +165,20 @@ func requireBinary(tb testing.TB, binary string) string {
}

func getWindowsNanoserverImage(build uint16) string {
tag, err := constants.ImageFromBuild(build)
tag, err := images.ImageFromBuild(build)
if err != nil {
panic(err)
}
return constants.NanoserverImage(tag)
return images.NanoserverImage(tag)
}

//nolint:unused // may be used in future tests
func getWindowsServerCoreImage(build uint16) string {
tag, err := constants.ImageFromBuild(build)
tag, err := images.ImageFromBuild(build)
if err != nil {
panic(err)
}
return constants.ServercoreImage(tag)
return images.ServercoreImage(tag)
}

func createGRPCConn(ctx context.Context) (*grpc.ClientConn, error) {
Expand Down
4 changes: 2 additions & 2 deletions test/cri-containerd/pod_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"fmt"
"testing"

"github.com/Microsoft/hcsshim/internal/cpugroup"
"github.com/Microsoft/hcsshim/internal/memory"
"github.com/Microsoft/hcsshim/internal/processorinfo"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/pkg/definitions/cpugroup"
"github.com/Microsoft/hcsshim/test/pkg/definitions/processorinfo"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)

Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (

runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"

"github.com/Microsoft/hcsshim/internal/tools/securitypolicy/helpers"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/pkg/securitypolicy"
"github.com/Microsoft/hcsshim/test/pkg/definitions/tools/securitypolicy/helpers"
)

var validPolicyAlpineCommand = []string{"ash", "-c", "echo 'Hello'"}
Expand Down
14 changes: 7 additions & 7 deletions test/cri-containerd/runpodsandbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import (
"testing"
"time"

"github.com/Microsoft/hcsshim/internal/cpugroup"
"github.com/Microsoft/hcsshim/internal/hcs"
"github.com/Microsoft/hcsshim/internal/lcow"
"github.com/Microsoft/hcsshim/internal/processorinfo"
"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/pkg/annotations"
"github.com/Microsoft/hcsshim/test/internal/require"
testuvm "github.com/Microsoft/hcsshim/test/internal/uvm"
"github.com/Microsoft/hcsshim/test/pkg/definitions/cpugroup"
"github.com/Microsoft/hcsshim/test/pkg/definitions/hcs"
"github.com/Microsoft/hcsshim/test/pkg/definitions/lcow"
"github.com/Microsoft/hcsshim/test/pkg/definitions/processorinfo"
"github.com/Microsoft/hcsshim/test/pkg/definitions/shimdiag"
"github.com/Microsoft/hcsshim/test/pkg/require"
testuvm "github.com/Microsoft/hcsshim/test/pkg/uvm"
"github.com/containerd/containerd/log"
"golang.org/x/sys/windows"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
Expand Down
2 changes: 1 addition & 1 deletion test/cri-containerd/stopcontainer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/pkg/require"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)

Expand Down
4 changes: 2 additions & 2 deletions test/functional/lcow_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/Microsoft/hcsshim/osversion"

"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/internal/uvm"
"github.com/Microsoft/hcsshim/test/pkg/require"
"github.com/Microsoft/hcsshim/test/pkg/uvm"
)

func BenchmarkLCOW_UVM_Create(b *testing.B) {
Expand Down
4 changes: 2 additions & 2 deletions test/functional/lcow_container_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/Microsoft/hcsshim/test/internal/container"
"github.com/Microsoft/hcsshim/test/internal/layers"
"github.com/Microsoft/hcsshim/test/internal/oci"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/internal/uvm"
"github.com/Microsoft/hcsshim/test/pkg/require"
"github.com/Microsoft/hcsshim/test/pkg/uvm"
)

func BenchmarkLCOW_Container(b *testing.B) {
Expand Down
4 changes: 2 additions & 2 deletions test/functional/lcow_container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/Microsoft/hcsshim/test/internal/container"
"github.com/Microsoft/hcsshim/test/internal/layers"
"github.com/Microsoft/hcsshim/test/internal/oci"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/internal/uvm"
"github.com/Microsoft/hcsshim/test/pkg/require"
"github.com/Microsoft/hcsshim/test/pkg/uvm"
)

func TestLCOW_ContainerLifecycle(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions test/functional/lcow_networking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/Microsoft/hcsshim/test/internal/container"
"github.com/Microsoft/hcsshim/test/internal/layers"
"github.com/Microsoft/hcsshim/test/internal/oci"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/internal/uvm"
"github.com/Microsoft/hcsshim/test/pkg/require"
"github.com/Microsoft/hcsshim/test/pkg/uvm"
)

func TestLCOW_IPv6_Assignment(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions test/functional/lcow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (

testutilities "github.com/Microsoft/hcsshim/test/internal"
testcmd "github.com/Microsoft/hcsshim/test/internal/cmd"
"github.com/Microsoft/hcsshim/test/internal/require"
testuvm "github.com/Microsoft/hcsshim/test/internal/uvm"
"github.com/Microsoft/hcsshim/test/pkg/require"
testuvm "github.com/Microsoft/hcsshim/test/pkg/uvm"
)

// test if waiting after creating (but not starting) an LCOW uVM returns
Expand Down
20 changes: 10 additions & 10 deletions test/functional/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,31 @@ import (
"github.com/Microsoft/hcsshim/internal/uvm"
"github.com/Microsoft/hcsshim/internal/winapi"

"github.com/Microsoft/hcsshim/test/internal/constants"
testflag "github.com/Microsoft/hcsshim/test/internal/flag"
"github.com/Microsoft/hcsshim/test/internal/layers"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/internal/util"
testuvm "github.com/Microsoft/hcsshim/test/internal/uvm"
testflag "github.com/Microsoft/hcsshim/test/pkg/flag"
"github.com/Microsoft/hcsshim/test/pkg/images"
"github.com/Microsoft/hcsshim/test/pkg/require"
testuvm "github.com/Microsoft/hcsshim/test/pkg/uvm"
)

// owner field for uVMs.
const hcsOwner = "hcsshim-functional-tests"

var (
alpineImagePaths = &layers.LazyImageLayers{
Image: constants.ImageLinuxAlpineLatest,
Platform: constants.PlatformLinux,
Image: images.ImageLinuxAlpineLatest,
Platform: images.PlatformLinux,
}
//TODO: pick appropriate image based on OS build
nanoserverImagePaths = &layers.LazyImageLayers{
Image: constants.ImageWindowsNanoserverLTSC2022,
Platform: constants.PlatformWindows,
Image: images.ImageWindowsNanoserverLTSC2022,
Platform: images.PlatformWindows,
}
// wcow tests originally used busyboxw; cannot find image on docker or mcr
servercoreImagePaths = &layers.LazyImageLayers{
Image: constants.ImageWindowsServercoreLTSC2022,
Platform: constants.PlatformWindows,
Image: images.ImageWindowsServercoreLTSC2022,
Platform: images.PlatformWindows,
}
)

Expand Down
4 changes: 2 additions & 2 deletions test/functional/uvm_mem_backingtype_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (

"github.com/Microsoft/hcsshim/internal/uvm"
"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/test/internal/require"
"github.com/Microsoft/hcsshim/test/pkg/require"
"github.com/sirupsen/logrus"

tuvm "github.com/Microsoft/hcsshim/test/internal/uvm"
tuvm "github.com/Microsoft/hcsshim/test/pkg/uvm"
)

func runMemStartLCOWTest(t *testing.T, opts *uvm.OptionsLCOW) {
Expand Down
4 changes: 2 additions & 2 deletions test/functional/uvm_memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/Microsoft/hcsshim/internal/uvm"
"github.com/Microsoft/hcsshim/osversion"

"github.com/Microsoft/hcsshim/test/internal/require"
tuvm "github.com/Microsoft/hcsshim/test/internal/uvm"
"github.com/Microsoft/hcsshim/test/pkg/require"
tuvm "github.com/Microsoft/hcsshim/test/pkg/uvm"
)

func TestUVMMemoryUpdateLCOW(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions test/functional/uvm_plannine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/Microsoft/hcsshim/internal/uvm"
"github.com/Microsoft/hcsshim/osversion"

"github.com/Microsoft/hcsshim/test/internal/require"
testuvm "github.com/Microsoft/hcsshim/test/internal/uvm"
"github.com/Microsoft/hcsshim/test/pkg/require"
testuvm "github.com/Microsoft/hcsshim/test/pkg/uvm"
)

// TestPlan9 tests adding/removing Plan9 shares to/from a v2 Linux utility VM
Expand Down
4 changes: 2 additions & 2 deletions test/functional/uvm_properties_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"testing"

"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/test/internal/require"
tuvm "github.com/Microsoft/hcsshim/test/internal/uvm"
"github.com/Microsoft/hcsshim/test/pkg/require"
tuvm "github.com/Microsoft/hcsshim/test/pkg/uvm"
)

func TestPropertiesGuestConnection_LCOW(t *testing.T) {
Expand Down
Loading