feat(register): add label format validation

This commit is contained in:
fuxiaohei
2022-11-21 20:12:25 +08:00
committed by Jason Song
parent e9e42e850b
commit 3f676a742b
2 changed files with 36 additions and 2 deletions

10
cmd/register_test.go Normal file
View File

@ -0,0 +1,10 @@
package cmd
import "testing"
func TestValidateLabels(t *testing.T) {
labels := []string{"ubuntu-latest:docker://node:16-buster"}
if err := validateLabels(labels); err != nil {
t.Errorf("validateLabels() error = %v", err)
}
}