mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
* feat(controller): expose observed node pool counts (poc) Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): keep node pool counts with pool queries Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): name compared node set current Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): use a generic json equality helper name Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): use inner join for node set counts Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): use node set names in count aggregation Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): consolidate node pool response mapping Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * docs: keep node pool field definitions in the api reference Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): restore single node pool response conversion Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(controller): colocate node pool count tests Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(controller): colocate node pool response count tests Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(api): name observed node pool count explicitly Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * fix(controller): compare template JSON numbers by exact value Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): limit JSON comparison to node pool counts Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): restore shared pool configuration comparison Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): move json equality to shared utils Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(controller): use unambiguous numeric precision fixtures Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): simplify node pool count responses Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * perf(controller): index nodes by node pool Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> --------- Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>
439 lines
15 KiB
Go
439 lines
15 KiB
Go
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package server
|
|
|
|
import (
|
|
"log/slog"
|
|
"testing"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/dsx-ai-factory/nvke/controller/api"
|
|
"github.com/dsx-ai-factory/nvke/controller/internal/config"
|
|
"github.com/dsx-ai-factory/nvke/controller/internal/db"
|
|
)
|
|
|
|
func TestValidateCreateNodePoolRequest_CAPICloudInitInputs(t *testing.T) {
|
|
service := NewNodePoolService(slog.Default(), nil, config.TeleportConfig{}, nil)
|
|
|
|
req := &api.CreateNodePoolRequest{
|
|
Name: "worker",
|
|
NodeNamePrefix: "worker",
|
|
DesiredNodeCount: 1,
|
|
Infra: &api.InfraNodePoolProvider{
|
|
MachineTemplate: map[string]interface{}{"apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "kind": "ExampleMachineTemplate"},
|
|
BootstrapFiles: []api.CloudInitFile{
|
|
{Path: "/etc/custom.conf", Content: "hello"},
|
|
},
|
|
PreKubeadmCommands: []string{"echo before kubeadm"},
|
|
},
|
|
}
|
|
err := service.validateCreateNodePoolRequest(capiCluster(), req)
|
|
require.NoError(t, err)
|
|
}
|
|
|
|
func TestValidateCreateNodePoolRequest_CAPIAllowsMissingConfigProfile(t *testing.T) {
|
|
service := NewNodePoolService(slog.Default(), nil, config.TeleportConfig{}, nil)
|
|
|
|
req := &api.CreateNodePoolRequest{
|
|
Name: "worker",
|
|
NodeNamePrefix: "worker",
|
|
DesiredNodeCount: 1,
|
|
Infra: &api.InfraNodePoolProvider{
|
|
MachineTemplate: map[string]interface{}{"apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "kind": "ExampleMachineTemplate"},
|
|
},
|
|
}
|
|
err := service.validateCreateNodePoolRequest(capiCluster(), req)
|
|
require.NoError(t, err)
|
|
}
|
|
|
|
func TestValidateCreateNodePoolRequest_CAPIRejectsNicoPayload(t *testing.T) {
|
|
service := NewNodePoolService(slog.Default(), nil, config.TeleportConfig{}, nil)
|
|
|
|
err := service.validateCreateNodePoolRequest(capiCluster(), &api.CreateNodePoolRequest{
|
|
Name: "worker",
|
|
NodeNamePrefix: "worker",
|
|
DesiredNodeCount: 1,
|
|
Nico: &api.NicoNodePoolProvider{Release: "ubuntu"},
|
|
})
|
|
require.EqualError(t, err, "nico is not supported, please provide infra")
|
|
}
|
|
|
|
func TestValidateCreateNodePoolRequest_ForgeRejectsCAPICloudInitInputs(t *testing.T) {
|
|
service := NewNodePoolService(slog.Default(), nil, config.TeleportConfig{}, nil)
|
|
|
|
err := service.validateCreateNodePoolRequest(forgeCluster(), &api.CreateNodePoolRequest{
|
|
Name: "worker",
|
|
NodeNamePrefix: "worker",
|
|
DesiredNodeCount: 1,
|
|
Nico: &api.NicoNodePoolProvider{
|
|
InstanceTypeID: uuid.New(),
|
|
Release: "ubuntu",
|
|
ConfigProfile: "default",
|
|
},
|
|
Infra: &api.InfraNodePoolProvider{
|
|
BootstrapFiles: []api.CloudInitFile{{Path: "/etc/custom.conf", Content: "hello"}},
|
|
PreKubeadmCommands: []string{"echo before kubeadm"},
|
|
},
|
|
})
|
|
require.EqualError(t, err, "infra is not supported, please provide nico")
|
|
}
|
|
|
|
func TestValidateCreateNodePoolRequest_ForgeConfigProfileIsOptional(t *testing.T) {
|
|
service := NewNodePoolService(slog.Default(), nil, config.TeleportConfig{}, nil)
|
|
|
|
req := &api.CreateNodePoolRequest{
|
|
Name: "worker",
|
|
NodeNamePrefix: "worker",
|
|
DesiredNodeCount: 1,
|
|
Nico: &api.NicoNodePoolProvider{
|
|
InstanceTypeID: uuid.New(),
|
|
Release: "ubuntu",
|
|
SubnetIDs: []uuid.UUID{uuid.New()},
|
|
},
|
|
}
|
|
err := service.validateCreateNodePoolRequest(forgeCluster(), req)
|
|
require.NoError(t, err)
|
|
}
|
|
|
|
func TestValidateUpdatedNodePool_RejectsManagedSpirePathsWhenSpireEnabled(t *testing.T) {
|
|
req := &api.CreateNodePoolRequest{
|
|
ClusterID: uuid.New(),
|
|
Name: "worker",
|
|
NodeNamePrefix: "worker",
|
|
DesiredNodeCount: 1,
|
|
Infra: &api.InfraNodePoolProvider{
|
|
MachineTemplate: map[string]interface{}{"apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "kind": "ExampleMachineTemplate"},
|
|
BootstrapFiles: []api.CloudInitFile{
|
|
{Path: "/etc/spire-agent/agent.conf", Content: "override"},
|
|
},
|
|
},
|
|
}
|
|
dbNodePool, err := dbNodePoolFromAPI(req, "1.32.0")
|
|
require.NoError(t, err)
|
|
|
|
err = validateUpdatedNodePool(capiCluster(), &dbNodePool)
|
|
require.EqualError(t, err, `file path "/etc/spire-agent/agent.conf" is managed by the controller and must not be provided`)
|
|
}
|
|
|
|
func TestDBNodePoolFromAPI_CopiesCAPICloudInitInputs(t *testing.T) {
|
|
req := &api.CreateNodePoolRequest{
|
|
ClusterID: uuid.New(),
|
|
Name: "worker",
|
|
NodeNamePrefix: "worker",
|
|
DesiredNodeCount: 1,
|
|
Infra: &api.InfraNodePoolProvider{
|
|
MachineTemplate: map[string]interface{}{"apiVersion": "infra.example.com/v1", "kind": "ExampleMachineTemplate"},
|
|
BootstrapFiles: []api.CloudInitFile{{Path: "/etc/custom.conf", Content: "hello"}},
|
|
PreKubeadmCommands: []string{"echo before kubeadm"},
|
|
},
|
|
}
|
|
dbNodePool, err := dbNodePoolFromAPI(req, "1.32.0")
|
|
require.NoError(t, err)
|
|
capiProvider, err := dbNodePool.CAPIProvider()
|
|
require.NoError(t, err)
|
|
require.Equal(t, []db.CloudInitFile{{Path: "/etc/custom.conf", Content: "hello"}}, capiProvider.BootstrapFiles)
|
|
require.Equal(t, []string{"echo before kubeadm"}, capiProvider.PreKubeadmCommands)
|
|
}
|
|
|
|
// capiCluster and forgeCluster build the minimal stored cluster shape the node
|
|
// pool validators dispatch on: the provider discriminator, plus the Forge
|
|
// identity fields a nico cluster always carries.
|
|
func capiCluster() db.Cluster {
|
|
return db.Cluster{ProviderType: db.ProviderTypeCAPI}
|
|
}
|
|
|
|
func launchLayerCluster() db.Cluster {
|
|
return db.Cluster{
|
|
ProviderType: db.ProviderTypeLaunchLayer,
|
|
LaunchLayer: &db.LaunchLayerClusterProvider{
|
|
OrgID: "test-org",
|
|
SiteID: "test-site",
|
|
},
|
|
}
|
|
}
|
|
|
|
func forgeCluster() db.Cluster {
|
|
return db.Cluster{
|
|
ProviderType: db.ProviderTypeNico,
|
|
Nico: &db.NicoClusterProvider{
|
|
OrgID: "test-org",
|
|
SiteID: uuid.New(),
|
|
},
|
|
}
|
|
}
|
|
|
|
func TestDbNodePoolFromAPI_EveryNestedNicoFieldReachesTheStoredPool(t *testing.T) {
|
|
subnet := uuid.New()
|
|
vpcPrefix := uuid.New()
|
|
instanceType := uuid.New()
|
|
ib := uuid.New()
|
|
nv := uuid.New()
|
|
ssh := uuid.New()
|
|
|
|
req := &api.CreateNodePoolRequest{
|
|
ClusterID: uuid.New(),
|
|
Name: "worker",
|
|
NodeNamePrefix: "w",
|
|
Nico: &api.NicoNodePoolProvider{
|
|
SubnetIDs: []uuid.UUID{subnet},
|
|
VpcPrefixIDs: []uuid.UUID{vpcPrefix},
|
|
InstanceTypeID: instanceType,
|
|
InfinibandPartitionID: &ib,
|
|
NvLinkLogicalPartitionID: &nv,
|
|
SSHKeyGroupIDs: &[]uuid.UUID{ssh},
|
|
Release: "os",
|
|
ConfigProfile: "cfg",
|
|
DiskSelectionStrategy: api.DiskSelectionStrategyCreateLargest,
|
|
},
|
|
}
|
|
|
|
pool, err := dbNodePoolFromAPI(req, "1.31.0")
|
|
require.NoError(t, err)
|
|
require.NotNil(t, pool.Nico)
|
|
assert.Nil(t, pool.Capi)
|
|
|
|
nico := pool.Nico
|
|
assert.Equal(t, []uuid.UUID{subnet}, nico.SubnetIDs)
|
|
assert.Equal(t, []uuid.UUID{vpcPrefix}, nico.VpcPrefixIDs)
|
|
assert.Equal(t, instanceType, nico.InstanceTypeID)
|
|
require.NotNil(t, nico.InfinibandPartitionID)
|
|
assert.Equal(t, ib, *nico.InfinibandPartitionID)
|
|
require.NotNil(t, nico.NvLinkLogicalPartitionID)
|
|
assert.Equal(t, nv, *nico.NvLinkLogicalPartitionID)
|
|
assert.Equal(t, []uuid.UUID{ssh}, nico.SSHKeyGroupIDs)
|
|
assert.Equal(t, "os", nico.Release)
|
|
assert.Equal(t, "cfg", nico.ConfigProfile)
|
|
assert.Equal(t, db.DiskSelectionStrategy(api.DiskSelectionStrategyCreateLargest), nico.DiskSelectionStrategy)
|
|
|
|
got := apiNodePoolFromDB(&pool, db.NodePoolCounts{})
|
|
require.NotNil(t, got.Nico)
|
|
assert.Equal(t, "os", got.Nico.Release)
|
|
assert.Nil(t, got.Infra)
|
|
}
|
|
|
|
func TestDbNodePoolFromAPI_EveryNestedCapiFieldReachesTheStoredPool(t *testing.T) {
|
|
tmpl := map[string]interface{}{"kind": "DockerMachineTemplate"}
|
|
files := []api.CloudInitFile{{Path: "/tmp/a", Content: "x"}}
|
|
|
|
req := &api.CreateNodePoolRequest{
|
|
ClusterID: uuid.New(),
|
|
Name: "worker",
|
|
NodeNamePrefix: "w",
|
|
Infra: &api.InfraNodePoolProvider{
|
|
MachineTemplate: tmpl,
|
|
BootstrapFiles: files,
|
|
PreKubeadmCommands: []string{"echo hi"},
|
|
},
|
|
}
|
|
|
|
pool, err := dbNodePoolFromAPI(req, "1.31.0")
|
|
require.NoError(t, err)
|
|
require.NotNil(t, pool.Capi)
|
|
assert.Nil(t, pool.Nico)
|
|
assert.Empty(t, pool.Capi.SpireAttestationMethod)
|
|
assert.Equal(t, []string{"echo hi"}, pool.Capi.PreKubeadmCommands)
|
|
assert.Equal(t, []db.CloudInitFile{{Path: "/tmp/a", Content: "x"}}, pool.Capi.BootstrapFiles)
|
|
|
|
got := apiNodePoolFromDB(&pool, db.NodePoolCounts{})
|
|
require.NotNil(t, got.Infra)
|
|
assert.Equal(t, "DockerMachineTemplate", got.Infra.MachineTemplate["kind"])
|
|
assert.Equal(t, files, got.Infra.BootstrapFiles)
|
|
assert.Nil(t, got.Nico)
|
|
}
|
|
|
|
func TestApplyUpdateNodePoolRequest_NestedNicoPatch(t *testing.T) {
|
|
subnetA := uuid.New()
|
|
subnetB := uuid.New()
|
|
newForgePool := func() *db.NodePool {
|
|
pool := &db.NodePool{
|
|
ID: uuid.New(),
|
|
ClusterID: uuid.New(),
|
|
Name: "worker",
|
|
NodeNamePrefix: "w",
|
|
KubernetesVersion: "1.31.0",
|
|
NodeLabels: map[string]string{},
|
|
Conditions: db.NodePoolConditions{},
|
|
}
|
|
pool.SetNico(db.NicoNodePoolProvider{
|
|
SubnetIDs: []uuid.UUID{subnetA},
|
|
VpcPrefixIDs: []uuid.UUID{},
|
|
InstanceTypeID: uuid.New(),
|
|
SSHKeyGroupIDs: []uuid.UUID{},
|
|
Release: "os",
|
|
ConfigProfile: "cfg",
|
|
DiskSelectionStrategy: db.DiskSelectionStrategySmallest,
|
|
})
|
|
return pool
|
|
}
|
|
|
|
t.Run("a value replaces the stored one", func(t *testing.T) {
|
|
pool := newForgePool()
|
|
req := &api.UpdateNodePoolRequest{
|
|
Nico: &api.NicoNodePoolProviderUpdate{
|
|
SubnetIDs: []uuid.UUID{subnetB},
|
|
Release: ptrString("os-v2"),
|
|
},
|
|
}
|
|
require.NoError(t, applyUpdateNodePoolRequest(forgeCluster(), pool, req))
|
|
|
|
require.NotNil(t, pool.Nico)
|
|
assert.Equal(t, []uuid.UUID{subnetB}, pool.Nico.SubnetIDs)
|
|
assert.Equal(t, "os-v2", pool.Nico.Release)
|
|
|
|
got := apiNodePoolFromDB(pool, db.NodePoolCounts{})
|
|
require.NotNil(t, got.Nico)
|
|
assert.Equal(t, []uuid.UUID{subnetB}, got.Nico.SubnetIDs)
|
|
assert.Equal(t, "os-v2", got.Nico.Release)
|
|
})
|
|
|
|
t.Run("an empty list clears the stored one", func(t *testing.T) {
|
|
pool := newForgePool()
|
|
req := &api.UpdateNodePoolRequest{
|
|
Nico: &api.NicoNodePoolProviderUpdate{SubnetIDs: []uuid.UUID{}},
|
|
}
|
|
require.NoError(t, applyUpdateNodePoolRequest(forgeCluster(), pool, req))
|
|
|
|
require.NotNil(t, pool.Nico)
|
|
assert.Empty(t, pool.Nico.SubnetIDs)
|
|
})
|
|
|
|
t.Run("an omitted field leaves the stored one alone", func(t *testing.T) {
|
|
pool := newForgePool()
|
|
req := &api.UpdateNodePoolRequest{
|
|
Nico: &api.NicoNodePoolProviderUpdate{ConfigProfile: ptrString("cfg-v2")},
|
|
}
|
|
require.NoError(t, applyUpdateNodePoolRequest(forgeCluster(), pool, req))
|
|
|
|
require.NotNil(t, pool.Nico)
|
|
assert.Equal(t, "cfg-v2", pool.Nico.ConfigProfile)
|
|
assert.Equal(t, "os", pool.Nico.Release)
|
|
assert.Equal(t, []uuid.UUID{subnetA}, pool.Nico.SubnetIDs)
|
|
})
|
|
}
|
|
|
|
func TestApplyUpdateNodePoolRequest_LaunchLayerFieldsAreFixedAtCreation(t *testing.T) {
|
|
pool := &db.NodePool{
|
|
ID: uuid.New(),
|
|
ClusterID: uuid.New(),
|
|
Name: "worker",
|
|
NodeNamePrefix: "w",
|
|
KubernetesVersion: "1.31.0",
|
|
NodeLabels: map[string]string{},
|
|
Conditions: db.NodePoolConditions{},
|
|
}
|
|
pool.SetLaunchLayer(db.LaunchLayerNodePoolProvider{
|
|
InstanceType: "vm200",
|
|
HostOSProfile: "ubuntu-bm",
|
|
})
|
|
|
|
// LaunchLayerNodePoolProviderUpdate carries no properties (matches
|
|
// LaunchLayerControlPlaneProviderUpdate and NicoNodePoolProviderUpdate's
|
|
// fixed-at-creation fields): an empty launchLayer object is all a caller
|
|
// can ever send, and applying it must change nothing.
|
|
req := &api.UpdateNodePoolRequest{LaunchLayer: &api.LaunchLayerNodePoolProviderUpdate{}}
|
|
require.NoError(t, applyUpdateNodePoolRequest(launchLayerCluster(), pool, req))
|
|
|
|
require.NotNil(t, pool.LaunchLayer)
|
|
assert.Equal(t, "vm200", pool.LaunchLayer.InstanceType)
|
|
assert.Equal(t, "ubuntu-bm", pool.LaunchLayer.HostOSProfile)
|
|
}
|
|
|
|
func TestApiNodePoolFromDB_EmitsNestedWhenPayloadPresent(t *testing.T) {
|
|
pool := &db.NodePool{
|
|
ID: uuid.New(),
|
|
ClusterID: uuid.New(),
|
|
Name: "worker",
|
|
NodeNamePrefix: "w",
|
|
KubernetesVersion: "1.31.0",
|
|
NodeLabels: map[string]string{},
|
|
Conditions: db.NodePoolConditions{},
|
|
Nico: &db.NicoNodePoolProvider{
|
|
InstanceTypeID: uuid.New(),
|
|
SSHKeyGroupIDs: []uuid.UUID{},
|
|
Release: "os",
|
|
ConfigProfile: "cfg",
|
|
SubnetIDs: []uuid.UUID{uuid.New()},
|
|
VpcPrefixIDs: []uuid.UUID{},
|
|
DiskSelectionStrategy: db.DiskSelectionStrategySmallest,
|
|
},
|
|
}
|
|
|
|
got := apiNodePoolFromDB(pool, db.NodePoolCounts{})
|
|
require.NotNil(t, got.Nico)
|
|
assert.Equal(t, "os", got.Nico.Release)
|
|
assert.Nil(t, got.Infra)
|
|
}
|
|
|
|
func TestNodePoolGetThenPatchNestedMutableOnly(t *testing.T) {
|
|
// A GET echoes the whole nico object, including the immutable fields; a PATCH
|
|
// takes only the mutable subset. Pin that a stripped-down patch round-trips.
|
|
// The rejection of an unstripped echo is covered by
|
|
// TestOpenAPIValidator_UpdateNodePool, since the update schema is what rejects it.
|
|
pool := &db.NodePool{
|
|
ID: uuid.New(),
|
|
ClusterID: uuid.New(),
|
|
Name: "worker",
|
|
NodeNamePrefix: "w",
|
|
KubernetesVersion: "1.31.0",
|
|
NodeLabels: map[string]string{},
|
|
Conditions: db.NodePoolConditions{},
|
|
}
|
|
pool.SetNico(db.NicoNodePoolProvider{
|
|
SubnetIDs: []uuid.UUID{uuid.New()},
|
|
VpcPrefixIDs: []uuid.UUID{},
|
|
InstanceTypeID: uuid.New(),
|
|
SSHKeyGroupIDs: []uuid.UUID{uuid.New()},
|
|
Release: "os",
|
|
ConfigProfile: "cfg",
|
|
DiskSelectionStrategy: db.DiskSelectionStrategySmallest,
|
|
})
|
|
got := apiNodePoolFromDB(pool, db.NodePoolCounts{})
|
|
require.NotNil(t, got.Nico)
|
|
|
|
assert.NotEqual(t, uuid.Nil, got.Nico.InstanceTypeID)
|
|
|
|
t.Run("mutable-only nested patch is accepted", func(t *testing.T) {
|
|
newSubnet := uuid.New()
|
|
req := &api.UpdateNodePoolRequest{
|
|
Nico: &api.NicoNodePoolProviderUpdate{
|
|
SubnetIDs: []uuid.UUID{newSubnet},
|
|
Release: ptrString("os-v2"),
|
|
},
|
|
}
|
|
require.NoError(t, applyUpdateNodePoolRequest(forgeCluster(), pool, req))
|
|
assert.Equal(t, []uuid.UUID{newSubnet}, pool.Nico.SubnetIDs)
|
|
assert.Equal(t, "os-v2", pool.Nico.Release)
|
|
})
|
|
}
|
|
|
|
func TestNodePool_MachineMetadataRoundTrip(t *testing.T) {
|
|
type parameters struct{ annotations, labels map[string]string }
|
|
tests := map[string]parameters{
|
|
"omitted": {},
|
|
"configured": {annotations: map[string]string{"example.com/profiles": "gpu,network"}, labels: map[string]string{"example.com/pool": "gpu"}},
|
|
}
|
|
for name, params := range tests {
|
|
t.Run(name, func(t *testing.T) {
|
|
req := api.CreateNodePoolRequest{
|
|
MachineAnnotations: params.annotations, MachineLabels: params.labels,
|
|
Nico: &api.NicoNodePoolProvider{Release: "test-release", ConfigProfile: "legacy-profile"},
|
|
}
|
|
stored, err := dbNodePoolFromAPI(&req, "1.32.1")
|
|
require.NoError(t, err)
|
|
require.NotNil(t, stored.MachineAnnotations)
|
|
require.NotNil(t, stored.MachineLabels)
|
|
loaded := stored
|
|
response := apiNodePoolFromDB(&loaded, db.NodePoolCounts{})
|
|
require.Equal(t, db.CloneStringMap(params.annotations), response.MachineAnnotations)
|
|
require.Equal(t, db.CloneStringMap(params.labels), response.MachineLabels)
|
|
require.Equal(t, "legacy-profile", response.Nico.ConfigProfile)
|
|
response.MachineAnnotations["example.com/response-only"] = "value"
|
|
require.NotContains(t, loaded.MachineAnnotations, "example.com/response-only")
|
|
})
|
|
}
|
|
}
|