test for plugin path builder

This commit is contained in:
Carl Bergquist
2017-12-20 16:33:53 +01:00
parent 20284f7745
commit d2ea5415da
2 changed files with 17 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
package plugins
import "testing"
func TestExecutablePathBuilder(t *testing.T) {
have := buildExecutablePath("/var/grafana/plugins/grafana-simple-json-datasource", "simple-json", "linux", "amd64")
want := `/var/grafana/plugins/grafana-simple-json-datasource/simple-json_linux_amd64`
if have != want {
t.Errorf("expected %s got %s", want, have)
}
}