mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-03-20 03:46:09 +08:00
20 lines
463 B
Go
20 lines
463 B
Go
// Copyright 2025 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestRegisterNonInteractiveReturnsLabelValidationError(t *testing.T) {
|
|
err := registerNoInteractive(t.Context(), "", ®isterArgs{
|
|
Labels: "label:invalid",
|
|
Token: "token",
|
|
InstanceAddr: "http://localhost:3000",
|
|
})
|
|
require.Error(t, err, "unsupported schema: invalid")
|
|
}
|