Use labels only when default namespace is provided and prefer given
options. Implements same approach of setting defaults for `NewWithConn`. Signed-off-by: Nikhil Soni <krsoninikhil@gmail.com>
This commit is contained in:
@@ -405,11 +405,12 @@ func TestDefaultRuntimeWithNamespaceLabels(t *testing.T) {
|
||||
defer cancel()
|
||||
namespaces := client.NamespaceService()
|
||||
testRuntime := "testRuntime"
|
||||
if err := namespaces.SetLabel(ctx, testNamespace, "runtime", testRuntime); err != nil {
|
||||
runtimeLabel := "containerd.io/defaults/runtime"
|
||||
if err := namespaces.SetLabel(ctx, testNamespace, runtimeLabel, testRuntime); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
testClient, err := newClient(t, address, WithDefaultNamespace(testNamespace))
|
||||
testClient, err := New(address, WithDefaultNamespace(testNamespace))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user