diff --git a/Makefile b/Makefile index 8f264421d..9e523b06b 100644 --- a/Makefile +++ b/Makefile @@ -145,6 +145,7 @@ run: generate fmt vet ## Run against the configured Kubernetes cluster in ~/.kub test: generate fmt vet manifests ${ENVTEST_BINARY_ASSETS} ${KUBEBUILDER} ## Run tests cd pkg/sdk/logging && ENVTEST_BINARY_ASSETS=${ENVTEST_BINARY_ASSETS} go test ./... cd pkg/sdk/extensions && go test ./... + cd pkg/sdk/logging/model/syslogng/config && go test ./... ENVTEST_BINARY_ASSETS=${ENVTEST_BINARY_ASSETS} go test ./controllers/logging/... ./pkg/... -coverprofile cover.out ENVTEST_BINARY_ASSETS=${ENVTEST_BINARY_ASSETS} go test ./controllers/extensions/... ./pkg/... -coverprofile cover.out diff --git a/pkg/sdk/logging/model/syslogng/config/config_test.go b/pkg/sdk/logging/model/syslogng/config/config_test.go index 3e073fba4..2583a0fe8 100644 --- a/pkg/sdk/logging/model/syslogng/config/config_test.go +++ b/pkg/sdk/logging/model/syslogng/config/config_test.go @@ -107,7 +107,7 @@ func TestRenderConfigInto(t *testing.T) { }, SecretLoaderFactory: &TestSecretLoaderFactory{}, }, - wantOut: Untab(`@version: 3.37 + wantOut: Untab(`@version: current @include "scl.conf" @@ -159,7 +159,7 @@ log { SourcePort: 601, SecretLoaderFactory: &TestSecretLoaderFactory{}, }, - wantOut: `@version: 3.37 + wantOut: `@version: current @include "scl.conf" @@ -220,7 +220,7 @@ source "main_input" { }, }, }, - wantOut: Untab(`@version: 3.37 + wantOut: Untab(`@version: current @include "scl.conf" @@ -302,7 +302,7 @@ log { }, SourcePort: 601, }, - wantOut: `@version: 3.37 + wantOut: `@version: current @include "scl.conf" @@ -358,7 +358,7 @@ destination "output_default_my-output" { SecretLoaderFactory: &TestSecretLoaderFactory{}, SourcePort: 601, }, - wantOut: `@version: 3.37 + wantOut: `@version: current @include "scl.conf" @@ -422,7 +422,7 @@ log { SecretLoaderFactory: &TestSecretLoaderFactory{}, SourcePort: 601, }, - wantOut: Untab(`@version: 3.37 + wantOut: Untab(`@version: current @include "scl.conf" @@ -486,7 +486,7 @@ log { SecretLoaderFactory: &TestSecretLoaderFactory{}, SourcePort: 601, }, - wantOut: Untab(`@version: 3.37 + wantOut: Untab(`@version: current @include "scl.conf" @@ -550,7 +550,7 @@ log { SecretLoaderFactory: &TestSecretLoaderFactory{}, SourcePort: 601, }, - wantOut: Untab(`@version: 3.37 + wantOut: Untab(`@version: current @include "scl.conf" @@ -594,7 +594,7 @@ log { SecretLoaderFactory: &TestSecretLoaderFactory{}, SourcePort: 601, }, - wantOut: Untab(`@version: 3.37 + wantOut: Untab(`@version: current @include "scl.conf" diff --git a/pkg/sdk/logging/model/syslogng/config/output_tests/loggly_test.go b/pkg/sdk/logging/model/syslogng/config/output_tests/loggly_test.go index 379f0a8ff..34afb0ad4 100644 --- a/pkg/sdk/logging/model/syslogng/config/output_tests/loggly_test.go +++ b/pkg/sdk/logging/model/syslogng/config/output_tests/loggly_test.go @@ -17,11 +17,12 @@ package test import ( "testing" + "github.com/cisco-open/operator-tools/pkg/secret" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/kube-logging/logging-operator/pkg/sdk/logging/api/v1beta1" "github.com/kube-logging/logging-operator/pkg/sdk/logging/model/syslogng/config" "github.com/kube-logging/logging-operator/pkg/sdk/logging/model/syslogng/output" - "github.com/cisco-open/operator-tools/pkg/secret" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestLogglyOutput(t *testing.T) { @@ -43,7 +44,7 @@ func TestLogglyOutput(t *testing.T) { }, ` destination "output_default_test-loggly-out" { - loggly("localhost" tag("test-tag") token("asd") persist_name("output_default_test-syslog-out")); + loggly("localhost" tag("test-tag") token("asd") persist_name("output_default_test-loggly-out")); }; `, )