Merge pull request #9415 from kiashok/fixIntegrationClientAddr

Use different containerd sock address for integration test client
This commit is contained in:
Mike Brown 2024-04-08 22:58:33 +00:00 committed by GitHub
commit 406e9e84b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 40 additions and 7 deletions

View File

@ -41,7 +41,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) {

View File

@ -18,7 +18,6 @@
package client
//nolint:unused // some variables used for fuzz
const (
defaultRoot = "/var/lib/containerd-test"
defaultState = "/run/containerd-test"

View File

@ -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`
)

View File

@ -24,11 +24,6 @@ import (
"github.com/Microsoft/hcsshim/osversion"
)
//nolint:unused // some variables used for fuzz
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")