feat(test): adding tests for the "File" struct
feat(test): moving util funcs into utils module
This commit is contained in:
13
data/templates/go-test-go.tpl
Normal file
13
data/templates/go-test-go.tpl
Normal file
@ -0,0 +1,13 @@
|
||||
### Go template test ###
|
||||
{{ if .Vars.AuthEnabled }}
|
||||
auth_enabled: true
|
||||
{{ else }}
|
||||
auth_enabled: false
|
||||
{{ end }}
|
||||
|
||||
server:
|
||||
http_listen_port: {{ .Vars.HTTPPort }}
|
||||
grpc_listen_port: {{ .Vars.GRPCPort }}
|
||||
log_level: {{ .Vars.LogLevel }}
|
||||
|
||||
### End Go template test ###
|
12
data/templates/go-test-hcl.pktpl.hcl
Normal file
12
data/templates/go-test-hcl.pktpl.hcl
Normal file
@ -0,0 +1,12 @@
|
||||
### HCL2 Template test ###
|
||||
%{ if Vars.AuthEnabled ~}
|
||||
auth_enabled: true
|
||||
%{ else }
|
||||
auth_enabled: false
|
||||
%{ endif }
|
||||
|
||||
server:
|
||||
http_listen_port: ${Vars.HTTPPort}
|
||||
grpc_listen_port: ${Vars.GRPCPort}
|
||||
log_level: ${Vars.LogLevel}
|
||||
### END HCL Template test ###
|
@ -1,13 +1,13 @@
|
||||
{{ if .AuthEnabled }}
|
||||
{{ if .Vars.AuthEnabled }}
|
||||
auth_enabled: true
|
||||
{{ else }}
|
||||
auth_enabled: false
|
||||
{{ end }}
|
||||
|
||||
server:
|
||||
http_listen_port: {{ .HTTPPort }}
|
||||
grpc_listen_port: {{ .GRPCPort }}
|
||||
log_level: {{ .LogLevel }}
|
||||
http_listen_port: {{ .Vars.HTTPPort }}
|
||||
grpc_listen_port: {{ .Vars.GRPCPort }}
|
||||
log_level: {{ .Vars.LogLevel }}
|
||||
|
||||
ingester:
|
||||
wal:
|
||||
|
Reference in New Issue
Block a user