Merge pull request #9428 from yibozhuang/containerd-stress-cri-endpoint
containerd-stress: use config address for CRI test
This commit is contained in:
		@@ -264,13 +264,12 @@ func serve(c config) error {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func criTest(c config) error {
 | 
					func criTest(c config) error {
 | 
				
			||||||
	var (
 | 
						var (
 | 
				
			||||||
		timeout     = 1 * time.Minute
 | 
							timeout = 1 * time.Minute
 | 
				
			||||||
		wg          sync.WaitGroup
 | 
							wg      sync.WaitGroup
 | 
				
			||||||
		ctx         = namespaces.WithNamespace(context.Background(), stressNs)
 | 
							ctx     = namespaces.WithNamespace(context.Background(), stressNs)
 | 
				
			||||||
		criEndpoint = "unix:///run/containerd/containerd.sock"
 | 
					 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	client, err := remote.NewRuntimeService(criEndpoint, timeout)
 | 
						client, err := remote.NewRuntimeService(c.Address, timeout)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return fmt.Errorf("failed to create runtime service: %w", err)
 | 
							return fmt.Errorf("failed to create runtime service: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user