statping/plugin/plugin_test.go

52 lines
1.3 KiB
Go
Raw Normal View History

2018-09-28 16:17:21 +00:00
// Statup
// Copyright (C) 2018. Hunter Long and the project contributors
// Written by Hunter Long <info@socialeck.com> and the project contributors
//
// https://github.com/hunterlong/statup
//
// The licenses for most software and other practical works are designed
// to take away your freedom to share and change the works. By contrast,
// the GNU General Public License is intended to guarantee your freedom to
// share and change all versions of a program--to make sure it remains free
// software for all its users.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package plugin
import (
2018-10-08 10:06:25 +00:00
"github.com/hunterlong/statup/source"
2018-10-11 00:43:23 +00:00
"github.com/hunterlong/statup/types"
2018-10-08 10:06:25 +00:00
"github.com/hunterlong/statup/utils"
2018-09-28 16:17:21 +00:00
"testing"
)
var (
2018-10-11 00:43:23 +00:00
example types.PluginActions
2018-09-28 16:17:21 +00:00
)
2018-10-08 10:06:25 +00:00
func init() {
utils.InitLogs()
source.Assets()
}
2018-10-11 00:43:23 +00:00
func TestLoadPlugin(t *testing.T) {
//err := LoadPlugin(dir+"/plugins/example.so")
//assert.Nil(t, err)
2018-10-08 10:06:25 +00:00
}
2018-09-28 16:17:21 +00:00
func TestAdd(t *testing.T) {
2018-10-11 00:43:23 +00:00
//err := Add(example)
//assert.NotNil(t, err)
2018-09-28 16:17:21 +00:00
}
func TestSelect(t *testing.T) {
2018-10-11 00:43:23 +00:00
//err := example.GetInfo()
//assert.Equal(t, "", err.Name)
2018-09-28 16:17:21 +00:00
}
2018-10-11 00:43:23 +00:00
//func TestAddRoute(t *testing.T) {
// example.AddRoute("/plugin_example", "GET", setupHandler)
//}