Skip to content

Commit fb559c0

Browse files
committed
test: add accidentally missing syslog-ng tests to ci
Signed-off-by: Peter Wilcsinszky <[email protected]>
1 parent 0279e63 commit fb559c0

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ run: generate fmt vet ## Run against the configured Kubernetes cluster in ~/.kub
145145
test: generate fmt vet manifests ${ENVTEST_BINARY_ASSETS} ${KUBEBUILDER} ## Run tests
146146
cd pkg/sdk/logging && ENVTEST_BINARY_ASSETS=${ENVTEST_BINARY_ASSETS} go test ./...
147147
cd pkg/sdk/extensions && go test ./...
148+
cd pkg/sdk/logging/model/syslogng/config && go test ./...
148149
ENVTEST_BINARY_ASSETS=${ENVTEST_BINARY_ASSETS} go test ./controllers/logging/... ./pkg/... -coverprofile cover.out
149150
ENVTEST_BINARY_ASSETS=${ENVTEST_BINARY_ASSETS} go test ./controllers/extensions/... ./pkg/... -coverprofile cover.out
150151

pkg/sdk/logging/model/syslogng/config/config_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func TestRenderConfigInto(t *testing.T) {
107107
},
108108
SecretLoaderFactory: &TestSecretLoaderFactory{},
109109
},
110-
wantOut: Untab(`@version: 3.37
110+
wantOut: Untab(`@version: current
111111
112112
@include "scl.conf"
113113
@@ -159,7 +159,7 @@ log {
159159
SourcePort: 601,
160160
SecretLoaderFactory: &TestSecretLoaderFactory{},
161161
},
162-
wantOut: `@version: 3.37
162+
wantOut: `@version: current
163163
164164
@include "scl.conf"
165165
@@ -220,7 +220,7 @@ source "main_input" {
220220
},
221221
},
222222
},
223-
wantOut: Untab(`@version: 3.37
223+
wantOut: Untab(`@version: current
224224
225225
@include "scl.conf"
226226
@@ -302,7 +302,7 @@ log {
302302
},
303303
SourcePort: 601,
304304
},
305-
wantOut: `@version: 3.37
305+
wantOut: `@version: current
306306
307307
@include "scl.conf"
308308
@@ -358,7 +358,7 @@ destination "output_default_my-output" {
358358
SecretLoaderFactory: &TestSecretLoaderFactory{},
359359
SourcePort: 601,
360360
},
361-
wantOut: `@version: 3.37
361+
wantOut: `@version: current
362362
363363
@include "scl.conf"
364364
@@ -422,7 +422,7 @@ log {
422422
SecretLoaderFactory: &TestSecretLoaderFactory{},
423423
SourcePort: 601,
424424
},
425-
wantOut: Untab(`@version: 3.37
425+
wantOut: Untab(`@version: current
426426
427427
@include "scl.conf"
428428
@@ -486,7 +486,7 @@ log {
486486
SecretLoaderFactory: &TestSecretLoaderFactory{},
487487
SourcePort: 601,
488488
},
489-
wantOut: Untab(`@version: 3.37
489+
wantOut: Untab(`@version: current
490490
491491
@include "scl.conf"
492492
@@ -550,7 +550,7 @@ log {
550550
SecretLoaderFactory: &TestSecretLoaderFactory{},
551551
SourcePort: 601,
552552
},
553-
wantOut: Untab(`@version: 3.37
553+
wantOut: Untab(`@version: current
554554
555555
@include "scl.conf"
556556
@@ -594,7 +594,7 @@ log {
594594
SecretLoaderFactory: &TestSecretLoaderFactory{},
595595
SourcePort: 601,
596596
},
597-
wantOut: Untab(`@version: 3.37
597+
wantOut: Untab(`@version: current
598598
599599
@include "scl.conf"
600600

pkg/sdk/logging/model/syslogng/config/output_tests/loggly_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ package test
1717
import (
1818
"testing"
1919

20+
"github.com/cisco-open/operator-tools/pkg/secret"
21+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22+
2023
"github.com/kube-logging/logging-operator/pkg/sdk/logging/api/v1beta1"
2124
"github.com/kube-logging/logging-operator/pkg/sdk/logging/model/syslogng/config"
2225
"github.com/kube-logging/logging-operator/pkg/sdk/logging/model/syslogng/output"
23-
"github.com/cisco-open/operator-tools/pkg/secret"
24-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2526
)
2627

2728
func TestLogglyOutput(t *testing.T) {
@@ -43,7 +44,7 @@ func TestLogglyOutput(t *testing.T) {
4344
},
4445
`
4546
destination "output_default_test-loggly-out" {
46-
loggly("localhost" tag("test-tag") token("asd") persist_name("output_default_test-syslog-out"));
47+
loggly("localhost" tag("test-tag") token("asd") persist_name("output_default_test-loggly-out"));
4748
};
4849
`,
4950
)

0 commit comments

Comments
 (0)