| 1 | package services_testscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/ |
| 2 | |
| 3 | import ( |
| 4 | "logscip-go gomod github.com/golang/go/src . log/" |
| 5 | "net/httpscip-go gomod github.com/golang/go/src . `net/http`/" |
| 6 | "testingscip-go gomod github.com/golang/go/src . testing/" |
| 7 | |
| 8 | "github.com/jarcoal/httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/" |
| 9 | "github.com/onsi/ginkgo/v2scip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/" |
| 10 | "github.com/onsi/gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/" |
| 11 | |
| 12 | "github.com/nicholas-fedor/shoutrrr/pkg/routerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/router`/" |
| 13 | "github.com/nicholas-fedor/shoutrrr/pkg/typesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/" |
| 14 | ) |
| 15 | |
| 16 | var serviceURLsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/serviceURLs. = map[string]string{ |
| 17 | "discord": "discord://token@id", |
| 18 | "gotify": "gotify://example.com/Aaa.bbb.ccc.ddd", |
| 19 | "googlechat": "googlechat://chat.googleapis.com/v1/spaces/FOO/messages?key=bar&token=baz", |
| 20 | "hangouts": "hangouts://chat.googleapis.com/v1/spaces/FOO/messages?key=bar&token=baz", |
| 21 | "ifttt": "ifttt://key?events=event", |
| 22 | "join": "join://:apikey@join/?devices=device", |
| 23 | "logger": "logger://", |
| 24 | "mattermost": "mattermost://[email protected]/token", |
| 25 | "opsgenie": "opsgenie://example.com/token?responders=user:dummy", |
| 26 | "pushbullet": "pushbullet://tokentokentokentokentokentokentoke", |
| 27 | "pushover": "pushover://:token@user/?devices=device", |
| 28 | "rocketchat": "rocketchat://example.com/token/channel", |
| 29 | "slack": "slack://AAAAAAAAA/BBBBBBBBB/123456789123456789123456", |
| 30 | "smtp": "smtp://host.tld:25/[email protected]&[email protected]", |
| 31 | "teams": "teams://?host=https%3A%2F%2Fprod-00.westus.logic.azure.com%3A443%2Fworkflows%2F00000000-0000-0000-0000-000000000000%2Ftriggers%2Fmanual%2Fpaths%2Finvoke%3Fapi-version%3D2016-06-00%26sp%3D%2Ftriggers%2Fmanual%2Frun%26sv%3D1.0%26sig%3DXXXXXXXX", |
| 32 | "telegram": "telegram://000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@telegram?channels=channel", |
| 33 | "twilio": "twilio://ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:authToken@+15551234567/+15559876543", |
| 34 | "xmpp": "xmpp://", |
| 35 | "zulip": "zulip://mail:[email protected]/?stream=foo&topic=bar", |
| 36 | } |
| 37 | |
| 38 | var serviceResponsesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/serviceResponses. = map[string]string{ |
| 39 | "discord": "", |
| 40 | "gotify": `{"id": 0}`, |
| 41 | "googlechat": "", |
| 42 | "hangouts": "", |
| 43 | "ifttt": "", |
| 44 | "join": "", |
| 45 | "logger": "", |
| 46 | "mattermost": "", |
| 47 | "opsgenie": "", |
| 48 | "pushbullet": `{"type": "note", "body": "test", "title": "test title", "active": true, "created": 0}`, |
| 49 | "pushover": "", |
| 50 | "rocketchat": "", |
| 51 | "slack": "", |
| 52 | "smtp": "", |
| 53 | "teams": "", |
| 54 | "telegram": "", |
| 55 | "twilio": `{"sid": "SM123"}`, |
| 56 | "xmpp": "", |
| 57 | "zulip": "", |
| 58 | } |
| 59 | |
| 60 | var loggerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/logger. = logscip-go gomod github.com/golang/go/src . log/.Newscip-go gomod github.com/golang/go/src . log/New().(ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.GinkgoWriterscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/GinkgoWriter., "Test", logscip-go gomod github.com/golang/go/src . log/.LstdFlagsscip-go gomod github.com/golang/go/src . log/LstdFlags.) |
| 61 | |
| 62 | var _ = ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Describescip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/Describe().("services", func() { |
| 63 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.BeforeEachscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/BeforeEach().(func() { |
| 64 | }) |
| 65 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.AfterEachscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/AfterEach().(func() { |
| 66 | }) |
| 67 | |
| 68 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Whenscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/When().("passed the a title param", func() { |
| 69 | var serviceRouterscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/_:serviceRouter. *routerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/router`/.ServiceRouterscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/router`/ServiceRouter# |
| 70 | |
| 71 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.AfterEachscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/AfterEach().(func() { |
| 72 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.DeactivateAndResetscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/DeactivateAndReset().() |
| 73 | }) |
| 74 | |
| 75 | for key, serviceURL := range serviceURLsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/serviceURLs. { |
| 76 | serviceRouterscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/_:serviceRouter., _ = routerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/router`/.NewWithOptionsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/router`/NewWithOptions().(loggerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/logger., typesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/.SenderOptionsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/SenderOptions#{}) |
| 77 | |
| 78 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Itscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/It().("should not throw an error for "+key, func() { |
| 79 | if key == "smtp" { |
| 80 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Skipscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/Skip().("smtp does not use HTTP and needs a specific test") |
| 81 | } |
| 82 | |
| 83 | if key == "xmpp" { |
| 84 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Skipscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/Skip().("not supported") |
| 85 | } |
| 86 | |
| 87 | service, err := serviceRouterscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/_:serviceRouter..Locatescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/router`/ServiceRouter#Locate().(serviceURL) |
| 88 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Expectscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 89 | |
| 90 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.Activatescip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/Activate().() |
| 91 | |
| 92 | customClient := &httpscip-go gomod github.com/golang/go/src . `net/http`/.Clientscip-go gomod github.com/golang/go/src . `net/http`/Client#{} |
| 93 | if setter, ok := service.(typesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/.HTTPClientSetterscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/HTTPClientSetter#); ok { |
| 94 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.ActivateNonDefaultscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/ActivateNonDefault().(customClient) |
| 95 | setter.SetHTTPClientscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/HTTPClientSetter#SetHTTPClient.(customClient) |
| 96 | } |
| 97 | |
| 98 | respStatus := httpscip-go gomod github.com/golang/go/src . `net/http`/.StatusOKscip-go gomod github.com/golang/go/src . `net/http`/StatusOK. |
| 99 | if key == "discord" || key == "ifttt" { |
| 100 | respStatus = httpscip-go gomod github.com/golang/go/src . `net/http`/.StatusNoContentscip-go gomod github.com/golang/go/src . `net/http`/StatusNoContent. |
| 101 | } |
| 102 | |
| 103 | if key == "twilio" { |
| 104 | respStatus = httpscip-go gomod github.com/golang/go/src . `net/http`/.StatusCreatedscip-go gomod github.com/golang/go/src . `net/http`/StatusCreated. |
| 105 | } |
| 106 | |
| 107 | if key == "mattermost" { |
| 108 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.RegisterResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/RegisterResponder().( |
| 109 | "POST", |
| 110 | "https://example.com/hooks/token", |
| 111 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewStringResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewStringResponder().(httpscip-go gomod github.com/golang/go/src . `net/http`/.StatusOKscip-go gomod github.com/golang/go/src . `net/http`/StatusOK., ""), |
| 112 | ) |
| 113 | } else { |
| 114 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.RegisterNoResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/RegisterNoResponder().( |
| 115 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewStringResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewStringResponder().(respStatus, serviceResponsesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/serviceResponses.[key]), |
| 116 | ) |
| 117 | } |
| 118 | |
| 119 | err = service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/Sender#Send.("test", (*typesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/.Paramsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/Params#)(&map[string]string{ |
| 120 | "title": "test title", |
| 121 | })) |
| 122 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Expectscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 123 | }) |
| 124 | |
| 125 | if key == "mattermost" { |
| 126 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Itscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/It().("should not throw an error for "+key+" with DisableTLS", func() { |
| 127 | modifiedURL := serviceURL + "?disabletls=yes" |
| 128 | service, err := serviceRouterscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/_:serviceRouter..Locatescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/router`/ServiceRouter#Locate().(modifiedURL) |
| 129 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Expectscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 130 | |
| 131 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.Activatescip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/Activate().() |
| 132 | |
| 133 | customClient := &httpscip-go gomod github.com/golang/go/src . `net/http`/.Clientscip-go gomod github.com/golang/go/src . `net/http`/Client#{} |
| 134 | if setter, ok := service.(typesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/.HTTPClientSetterscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/HTTPClientSetter#); ok { |
| 135 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.ActivateNonDefaultscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/ActivateNonDefault().(customClient) |
| 136 | setter.SetHTTPClientscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/HTTPClientSetter#SetHTTPClient.(customClient) |
| 137 | } |
| 138 | |
| 139 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.RegisterResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/RegisterResponder().( |
| 140 | "POST", |
| 141 | "http://example.com/hooks/token", |
| 142 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewStringResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewStringResponder().(httpscip-go gomod github.com/golang/go/src . `net/http`/.StatusOKscip-go gomod github.com/golang/go/src . `net/http`/StatusOK., ""), |
| 143 | ) |
| 144 | |
| 145 | err = service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/Sender#Send.("test", (*typesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/.Paramsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/Params#)(&map[string]string{ |
| 146 | "title": "test title", |
| 147 | })) |
| 148 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Expectscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 149 | }) |
| 150 | } |
| 151 | } |
| 152 | }) |
| 153 | |
| 154 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Describescip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/Describe().("custom HTTP client injection", func() { |
| 155 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Itscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/It().("should use the injected client when sending a notification", func() { |
| 156 | customClient := &httpscip-go gomod github.com/golang/go/src . `net/http`/.Clientscip-go gomod github.com/golang/go/src . `net/http`/Client#{} |
| 157 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.ActivateNonDefaultscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/ActivateNonDefault().(customClient) |
| 158 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.DeferCleanupscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/DeferCleanup().(httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.DeactivateAndResetscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/DeactivateAndReset().) |
| 159 | |
| 160 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.RegisterResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/RegisterResponder().( |
| 161 | "POST", |
| 162 | "https://example.com/webhook", |
| 163 | httpmockscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/.NewStringResponderscip-go gomod github.com/jarcoal/httpmock v1.4.2 `github.com/jarcoal/httpmock`/NewStringResponder().(httpscip-go gomod github.com/golang/go/src . `net/http`/.StatusOKscip-go gomod github.com/golang/go/src . `net/http`/StatusOK., ""), |
| 164 | ) |
| 165 | |
| 166 | sr, err := routerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/router`/.NewWithOptionsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/router`/NewWithOptions().( |
| 167 | loggerscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/logger., |
| 168 | typesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/.SenderOptionsscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/SenderOptions#{HTTPClientscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/SenderOptions#HTTPClient.: customClient}, |
| 169 | "generic+https://example.com/webhook", |
| 170 | ) |
| 171 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Expectscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 172 | |
| 173 | service, err := sr.Locatescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/router`/ServiceRouter#Locate().("generic+https://example.com/webhook") |
| 174 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Expectscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 175 | |
| 176 | err = service.Sendscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/types`/Sender#Send.("test", nil) |
| 177 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.Expectscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.HaveOccurredscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/HaveOccurred().()) |
| 178 | }) |
| 179 | }) |
| 180 | }) |
| 181 | |
| 182 | func TestServicesscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/pkg/services_test`/TestServices().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 183 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 184 | gomegascip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/.RegisterFailHandlerscip-go gomod github.com/onsi/gomega v1.42.1 `github.com/onsi/gomega`/RegisterFailHandler().(ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.Failscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/Fail().) |
| 185 | ginkgoscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/.RunSpecsscip-go gomod github.com/onsi/ginkgo/v2 v2.32.1 `github.com/onsi/ginkgo/v2`/RunSpecs().(t, "Service Compliance Suite") |
| 186 | } |