From 7da6c78449776e1f3c6716250bca0b712a0423a4 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 21 Jan 2021 13:25:36 +0300 Subject: Uniform all configs Add debug server Check nil's for all plugin intialization --- tests/plugins/static/config_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/plugins/static') diff --git a/tests/plugins/static/config_test.go b/tests/plugins/static/config_test.go index f458eed3..d73fd845 100644 --- a/tests/plugins/static/config_test.go +++ b/tests/plugins/static/config_test.go @@ -8,7 +8,7 @@ import ( ) func TestConfig_Forbids(t *testing.T) { - cfg := static.Config{Static: struct { + cfg := static.Config{Static: &struct { Dir string Forbid []string Always []string @@ -23,7 +23,7 @@ func TestConfig_Forbids(t *testing.T) { } func TestConfig_Valid(t *testing.T) { - assert.NoError(t, (&static.Config{Static: struct { + assert.NoError(t, (&static.Config{Static: &struct { Dir string Forbid []string Always []string @@ -31,15 +31,15 @@ func TestConfig_Valid(t *testing.T) { Response map[string]string }{Dir: "./"}}).Valid()) - assert.Error(t, (&static.Config{Static: struct { + assert.Error(t, (&static.Config{Static: &struct { Dir string Forbid []string Always []string Request map[string]string Response map[string]string - }{Dir: "./config.go"}}).Valid()) + }{Dir: "./http.go"}}).Valid()) - assert.Error(t, (&static.Config{Static: struct { + assert.Error(t, (&static.Config{Static: &struct { Dir string Forbid []string Always []string -- cgit v1.2.3