Remove example module and revert back to ints for simpler usage (#34)

* Remove example module and revert back to ints for simpler usage

* fmt

* remove unused transformations

* add max runners to the scaler
This commit is contained in:
Nikola Jokic
2025-11-27 13:31:44 +01:00
committed by GitHub
parent a2a8af97b6
commit 23bfd4848d
11 changed files with 203 additions and 291 deletions
+6 -6
View File
@@ -267,9 +267,9 @@ func TestGetRunner(t *testing.T) {
}
t.Run("Get Runner", func(t *testing.T) {
var runnerID int64 = 1
runnerID := 1
want := &RunnerReference{
ID: int(runnerID),
ID: runnerID,
Name: "self-hosted-ubuntu",
}
response := []byte(`{"id": 1, "name": "self-hosted-ubuntu"}`)
@@ -287,7 +287,7 @@ func TestGetRunner(t *testing.T) {
})
t.Run("Default retries on server error", func(t *testing.T) {
var runnerID int64 = 1
runnerID := 1
retryWaitMax := 1 * time.Millisecond
retryMax := 1
@@ -315,10 +315,10 @@ func TestGetRunnerByName(t *testing.T) {
}
t.Run("Get Runner by Name", func(t *testing.T) {
var runnerID int64 = 1
runnerID := 1
runnerName := "self-hosted-ubuntu"
want := &RunnerReference{
ID: int(runnerID),
ID: runnerID,
Name: runnerName,
}
response := []byte(`{"count": 1, "value": [{"id": 1, "name": "self-hosted-ubuntu"}]}`)
@@ -429,7 +429,7 @@ func TestGetRunnerGroupByName(t *testing.T) {
}
t.Run("Get RunnerGroup by Name", func(t *testing.T) {
var runnerGroupID uint64 = 1
runnerGroupID := 1
runnerGroupName := "test-runner-group"
want := &RunnerGroup{
ID: runnerGroupID,