Skip to content

Commit 8c76e79

Browse files
committed
Use different containerd sock address in tests
Signed-off-by: Kirtana Ashok <[email protected]> (cherry picked from commit 5b6ae0f) Signed-off-by: Kirtana Ashok <[email protected]>
1 parent 3d3287d commit 8c76e79

3 files changed

Lines changed: 40 additions & 6 deletions

File tree

integration/client/client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"testing"
2525

2626
"github.com/containerd/containerd"
27-
"github.com/containerd/containerd/defaults"
2827
"github.com/containerd/containerd/log/logtest"
2928
"github.com/containerd/containerd/namespaces"
3029
)
@@ -41,7 +40,7 @@ var (
4140
)
4241

4342
func init() {
44-
flag.StringVar(&address, "address", defaults.DefaultAddress, "The address to the containerd socket for use in the tests")
43+
flag.StringVar(&address, "address", defaultAddress, "The address to the containerd socket for use in the tests")
4544
}
4645

4746
func testContext(t testing.TB) (context.Context, context.CancelFunc) {
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//go:build windows
2+
3+
/*
4+
Copyright The containerd Authors.
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
*/
18+
19+
/*
20+
Copyright 2024 The containerd Authors.
21+
22+
Licensed under the Apache License, Version 2.0 (the "License");
23+
you may not use this file except in compliance with the License.
24+
You may obtain a copy of the License at
25+
26+
http://www.apache.org/licenses/LICENSE-2.0
27+
28+
Unless required by applicable law or agreed to in writing, software
29+
distributed under the License is distributed on an "AS IS" BASIS,
30+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31+
See the License for the specific language governing permissions and
32+
limitations under the License.
33+
*/
34+
35+
package client
36+
37+
const (
38+
defaultAddress = `\\.\pipe\containerd-containerd-test`
39+
)

integration/client/client_windows_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ import (
2525
_ "github.com/Microsoft/hcsshim/test/functional/manifest" // For rsrc_amd64.syso
2626
)
2727

28-
const (
29-
defaultAddress = `\\.\pipe\containerd-containerd-test`
30-
)
31-
3228
var (
3329
defaultRoot = filepath.Join(os.Getenv("programfiles"), "containerd", "root-test")
3430
defaultState = filepath.Join(os.Getenv("programfiles"), "containerd", "state-test")

0 commit comments

Comments
 (0)