starting with tests

This commit is contained in:
Nikola Jokic
2026-01-10 01:28:17 +01:00
parent 1ce073b56e
commit 26f573fa80
4 changed files with 14 additions and 70 deletions

View File

@@ -1,20 +0,0 @@
package tests
import (
"testing"
"github.com/gruntwork-io/terratest/modules/helm"
"github.com/gruntwork-io/terratest/modules/logger"
)
func TestAutoscalingRunnerSetLabels(t *testing.T) {
t.Parallel()
t.Run("should set default labels", func(t *testing.T) {
t.Parallel()
options := &helm.Options{
Logger: logger.Discard,
}
})
}

View File

@@ -6,4 +6,13 @@ tests:
set:
scaleset.name: "test"
auth.url: "https://github.com/org"
auth.githubToken: "gh_"
auth.githubToken: "gh_token12345"
controllerServiceAccount.name: "arc"
controllerServiceAccount.namespace: "arc-system"
release:
name: "test-name"
namespace: "test-namespace"
asserts:
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: "test-name"

View File

@@ -1,27 +0,0 @@
package tests
import (
"path/filepath"
"strings"
"github.com/gruntwork-io/terratest/modules/random"
)
var chartPath string
func init() {
var err error
chartPath, err = filepath.Abs("../../gha-runner-scale-set-dev")
if err != nil {
panic(err)
}
}
// generateNamespace generates namespace with given prefix
// If prefix is not specified, a default prefix "test-" is used
func generateNamespace(prefix string) string {
if prefix == "" {
prefix = "test-"
}
return prefix + strings.ToLower(random.UniqueId())
}