diff options
author | Valery Piashchynski <[email protected]> | 2021-09-16 21:46:50 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-09-16 21:46:50 +0300 |
commit | 3581b45f237a3f7aa29591ceb2bf6f4a4642a2f5 (patch) | |
tree | e723b19ec1ac16b7ccc7b3c2da69d4a416d63d81 /plugins/http/config/ssl_config_test.go | |
parent | 337d292dd2d6ff0a555098b1970d8194d8df8bc2 (diff) | |
parent | 823d831b57b75f70c7c3bbbee355f2016633bb3b (diff) |
[#803]: feat(plugins): move plugins to a separate repositoryv2.5.0-alpha.2
[#803]: feat(plugins): move plugins to a separate repository
Diffstat (limited to 'plugins/http/config/ssl_config_test.go')
-rw-r--r-- | plugins/http/config/ssl_config_test.go | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/plugins/http/config/ssl_config_test.go b/plugins/http/config/ssl_config_test.go deleted file mode 100644 index 8f6cf40e..00000000 --- a/plugins/http/config/ssl_config_test.go +++ /dev/null @@ -1,116 +0,0 @@ -package config - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestSSL_Valid1(t *testing.T) { - conf := &SSL{ - Address: "", - Redirect: false, - Key: "", - Cert: "", - RootCA: "", - host: "", - Port: 0, - } - - err := conf.Valid() - assert.Error(t, err) -} - -func TestSSL_Valid2(t *testing.T) { - conf := &SSL{ - Address: ":hello", - Redirect: false, - Key: "", - Cert: "", - RootCA: "", - host: "", - Port: 0, - } - - err := conf.Valid() - assert.Error(t, err) -} - -func TestSSL_Valid3(t *testing.T) { - conf := &SSL{ - Address: ":555", - Redirect: false, - Key: "", - Cert: "", - RootCA: "", - host: "", - Port: 0, - } - - err := conf.Valid() - assert.Error(t, err) -} - -func TestSSL_Valid4(t *testing.T) { - conf := &SSL{ - Address: ":555", - Redirect: false, - Key: "../../../tests/plugins/http/fixtures/server.key", - Cert: "../../../tests/plugins/http/fixtures/server.crt", - RootCA: "", - host: "", - // private - Port: 0, - } - - err := conf.Valid() - assert.NoError(t, err) -} - -func TestSSL_Valid5(t *testing.T) { - conf := &SSL{ - Address: "a:b:c", - Redirect: false, - Key: "../../../tests/plugins/http/fixtures/server.key", - Cert: "../../../tests/plugins/http/fixtures/server.crt", - RootCA: "", - host: "", - // private - Port: 0, - } - - err := conf.Valid() - assert.Error(t, err) -} - -func TestSSL_Valid6(t *testing.T) { - conf := &SSL{ - Address: ":", - Redirect: false, - Key: "../../../tests/plugins/http/fixtures/server.key", - Cert: "../../../tests/plugins/http/fixtures/server.crt", - RootCA: "", - host: "", - // private - Port: 0, - } - - err := conf.Valid() - assert.Error(t, err) -} - -func TestSSL_Valid7(t *testing.T) { - conf := &SSL{ - Address: "127.0.0.1:555:1", - Redirect: false, - Key: "../../../tests/plugins/http/fixtures/server.key", - Cert: "../../../tests/plugins/http/fixtures/server.crt", - RootCA: "", - host: "", - // private - Port: 0, - } - - err := conf.Valid() - assert.Error(t, err) -} |