mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
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>
26 lines
767 B
Go
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)
|
|
}
|
|
}
|