@@ -15,6 +15,7 @@ import (
1515 papiv1 "github.com/gotify/plugin-api"
1616 "github.com/gotify/plugin-api/v2"
1717 "github.com/gotify/plugin-api/v2/generated/protobuf"
18+ "github.com/gotify/plugin-api/v2/transport"
1819 "google.golang.org/grpc"
1920 "google.golang.org/grpc/credentials"
2021 "google.golang.org/protobuf/types/known/emptypb"
@@ -23,16 +24,16 @@ import (
2324func TestEcho (t * testing.T ) {
2425 pluginInfo := GetGotifyPluginInfo ()
2526
26- client , err := plugin .NewEphemeralTLSClient ()
27+ client , err := transport .NewEphemeralTLSClient ()
2728 if err != nil {
2829 t .Fatal (err )
2930 }
3031
3132 var reqRx , reqTx uintptr
3233 var respRx , respTx uintptr
3334
34- plugin .NewAnonPipe (& reqRx , & reqTx , true )
35- plugin .NewAnonPipe (& respRx , & respTx , true )
35+ transport .NewAnonPipe (& reqRx , & reqTx , true )
36+ transport .NewAnonPipe (& respRx , & respTx , true )
3637
3738 go func () {
3839 reqFileRx := os .NewFile (reqRx , fmt .Sprintf ("/proc/self/fd/%d" , reqRx ))
@@ -57,7 +58,7 @@ func TestEcho(t *testing.T) {
5758 t .Fatal (err )
5859 }
5960
60- listener , addr , err := plugin .NewListener ()
61+ listener , addr , err := transport .NewListener ()
6162 if err != nil {
6263 t .Fatal (err )
6364 }
@@ -175,7 +176,7 @@ func TestEcho(t *testing.T) {
175176 t .Fatal ("expected " , "Echo plugin running at: https://gotify.example.com/plugin/echo-test/echo" , " got " , displayResponse .GetMarkdown ())
176177 }
177178
178- tlsWebhookName := plugin .BuildPluginTLSName (plugin .PurposePluginWebhook , pluginInfo .ModulePath )
179+ tlsWebhookName := transport .BuildPluginTLSName (transport .PurposePluginWebhook , pluginInfo .ModulePath )
179180
180181 for range 3 {
181182 testreq := httptest .NewRequest ("GET" , "https://" + tlsWebhookName + "/plugin/echo-test/echo" , nil )
0 commit comments