feat: add worker install and deploy
Все проверки выполнены успешно
CI / test (push) Successful in 2m24s
Docker / Build and publish worker image (push) Successful in 13m24s
Все проверки выполнены успешно
CI / test (push) Successful in 2m24s
Docker / Build and publish worker image (push) Successful in 13m24s
Этот коммит содержится в:
@@ -3,9 +3,30 @@ package main
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDispatchManagementCommand(t *testing.T) {
|
||||
if handled, _ := dispatchManagementCommand(nil); handled {
|
||||
t.Fatal("empty arguments were handled")
|
||||
}
|
||||
if handled, code := dispatchManagementCommand([]string{"install", "--help"}); !handled || code != 0 {
|
||||
t.Fatalf("install help = handled %t code %d", handled, code)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSecretValue(t *testing.T) {
|
||||
path := t.TempDir() + "/secret"
|
||||
if err := os.WriteFile(path, []byte("value\n"), 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, err := secretValue("", path)
|
||||
if err != nil || got != "value" {
|
||||
t.Fatalf("secretValue() = %q, %v", got, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestProbeLiveness(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user