Skip to content

Commit

Permalink
Use different containerd sock address in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
(cherry picked from commit 5b6ae0f)
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
  • Loading branch information
kiashok committed Apr 10, 2024
1 parent 3d3287d commit 8c76e79
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
3 changes: 1 addition & 2 deletions integration/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"testing"

"github.com/containerd/containerd"
"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/log/logtest"
"github.com/containerd/containerd/namespaces"
)
Expand All @@ -41,7 +40,7 @@ var (
)

func init() {
flag.StringVar(&address, "address", defaults.DefaultAddress, "The address to the containerd socket for use in the tests")
flag.StringVar(&address, "address", defaultAddress, "The address to the containerd socket for use in the tests")
}

func testContext(t testing.TB) (context.Context, context.CancelFunc) {
Expand Down
39 changes: 39 additions & 0 deletions integration/client/client_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//go:build windows

/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

/*
Copyright 2024 The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package client

const (
defaultAddress = `\\.\pipe\containerd-containerd-test`
)
4 changes: 0 additions & 4 deletions integration/client/client_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ import (
_ "github.com/Microsoft/hcsshim/test/functional/manifest" // For rsrc_amd64.syso
)

const (
defaultAddress = `\\.\pipe\containerd-containerd-test`
)

var (
defaultRoot = filepath.Join(os.Getenv("programfiles"), "containerd", "root-test")
defaultState = filepath.Join(os.Getenv("programfiles"), "containerd", "state-test")
Expand Down

0 comments on commit 8c76e79

Please sign in to comment.