Files
cozystack/internal/gpu/consts_test.go
T
Aleksei Sviridkin 4cb240a500 feat(gpu): share resource-name ownership and capacity rules
The GPU components need consistent answers about catalog-name
ownership, free units, budget keys and tenant entitlement.

An acknowledged name belongs to its object UID even when an older
class changes its request. Only an exact, unique acknowledgement
confirms ownership; creation time selects candidates for unreserved
names, and duplicate acknowledgements stay ambiguous. These snapshot
rules do not fence future status writes or reserve GPU capacity.

Free units come from node allocatable and pod requests. A finite
NoExecute toleration cannot make a node an enduring placement option,
but a matching toleration without an expiry can.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-28 07:07:54 +03:00

26 lines
767 B
Go

/*
Copyright 2026 The Cozystack 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 gpu
import "testing"
func TestLicenseSecretName(t *testing.T) {
if got := LicenseSecretName("l40s-24c"); got != "gpuclass-l40s-24c-license" {
t.Errorf("LicenseSecretName = %q", got)
}
}