Rename k8s_audit to k8s-audit (easier to type, consistent with labels) (#2153)
This commit is contained in:
parent
ea6401ce09
commit
3fa555fb25
2 changed files with 8 additions and 8 deletions
|
@ -57,7 +57,7 @@ var AcquisitionSources = map[string]func() DataSource{
|
||||||
"kinesis": func() DataSource { return &kinesisacquisition.KinesisSource{} },
|
"kinesis": func() DataSource { return &kinesisacquisition.KinesisSource{} },
|
||||||
"wineventlog": func() DataSource { return &wineventlogacquisition.WinEventLogSource{} },
|
"wineventlog": func() DataSource { return &wineventlogacquisition.WinEventLogSource{} },
|
||||||
"kafka": func() DataSource { return &kafkaacquisition.KafkaSource{} },
|
"kafka": func() DataSource { return &kafkaacquisition.KafkaSource{} },
|
||||||
"k8s_audit": func() DataSource { return &k8sauditacquisition.KubernetesAuditSource{} },
|
"k8s-audit": func() DataSource { return &k8sauditacquisition.KubernetesAuditSource{} },
|
||||||
"s3": func() DataSource { return &s3acquisition.S3Source{} },
|
"s3": func() DataSource { return &s3acquisition.S3Source{} },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,18 +20,18 @@ func TestBadConfiguration(t *testing.T) {
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "unknown field",
|
name: "unknown field",
|
||||||
config: `source: k8s_audit
|
config: `source: k8s-audit
|
||||||
foobar: asd.log`,
|
foobar: asd.log`,
|
||||||
expectedErr: "line 2: field foobar not found in type kubernetesauditacquisition.KubernetesAuditConfiguration",
|
expectedErr: "line 2: field foobar not found in type kubernetesauditacquisition.KubernetesAuditConfiguration",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "missing listen_addr",
|
name: "missing listen_addr",
|
||||||
config: `source: k8s_audit`,
|
config: `source: k8s-audit`,
|
||||||
expectedErr: "listen_addr cannot be empty",
|
expectedErr: "listen_addr cannot be empty",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "missing listen_port",
|
name: "missing listen_port",
|
||||||
config: `source: k8s_audit
|
config: `source: k8s-audit
|
||||||
listen_addr: 0.0.0.0`,
|
listen_addr: 0.0.0.0`,
|
||||||
expectedErr: "listen_port cannot be empty",
|
expectedErr: "listen_port cannot be empty",
|
||||||
},
|
},
|
||||||
|
@ -57,7 +57,7 @@ func TestInvalidConfig(t *testing.T) {
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "invalid_port",
|
name: "invalid_port",
|
||||||
config: `source: k8s_audit
|
config: `source: k8s-audit
|
||||||
listen_addr: 127.0.0.1
|
listen_addr: 127.0.0.1
|
||||||
listen_port: 9999999
|
listen_port: 9999999
|
||||||
webhook_path: /k8s-audit`,
|
webhook_path: /k8s-audit`,
|
||||||
|
@ -109,7 +109,7 @@ func TestHandler(t *testing.T) {
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "valid_json",
|
name: "valid_json",
|
||||||
config: `source: k8s_audit
|
config: `source: k8s-audit
|
||||||
listen_addr: 127.0.0.1
|
listen_addr: 127.0.0.1
|
||||||
listen_port: 49234
|
listen_port: 49234
|
||||||
webhook_path: /k8s-audit`,
|
webhook_path: /k8s-audit`,
|
||||||
|
@ -208,7 +208,7 @@ webhook_path: /k8s-audit`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "invalid_json",
|
name: "invalid_json",
|
||||||
config: `source: k8s_audit
|
config: `source: k8s-audit
|
||||||
listen_addr: 127.0.0.1
|
listen_addr: 127.0.0.1
|
||||||
listen_port: 49234
|
listen_port: 49234
|
||||||
webhook_path: /k8s-audit`,
|
webhook_path: /k8s-audit`,
|
||||||
|
@ -219,7 +219,7 @@ webhook_path: /k8s-audit`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "invalid_method",
|
name: "invalid_method",
|
||||||
config: `source: k8s_audit
|
config: `source: k8s-audit
|
||||||
listen_addr: 127.0.0.1
|
listen_addr: 127.0.0.1
|
||||||
listen_port: 49234
|
listen_port: 49234
|
||||||
webhook_path: /k8s-audit`,
|
webhook_path: /k8s-audit`,
|
||||||
|
|
Loading…
Reference in a new issue