fix rebase artifacts

fix/snakeswap
nils måsén 3 years ago committed by nils måsén
parent 909c90a558
commit 385357bab5

@ -82,7 +82,7 @@ func testGetSecretsFromFiles(t *testing.T, flagName string, expected string) {
func TestHTTPAPIPeriodicPollsFlag(t *testing.T) { func TestHTTPAPIPeriodicPollsFlag(t *testing.T) {
cmd := new(cobra.Command) cmd := new(cobra.Command)
SetDefaults()
RegisterDockerFlags(cmd) RegisterDockerFlags(cmd)
RegisterSystemFlags(cmd) RegisterSystemFlags(cmd)

@ -101,12 +101,12 @@ var _ = Describe("notifications", func() {
When("passing a discord url to the slack notifier", func() { When("passing a discord url to the slack notifier", func() {
command := cmd.NewRootCommand() command := cmd.NewRootCommand()
flags.RegisterNotificationFlags(command) flags.RegisterNotificationFlags()
channel := "123456789" channel := "123456789"
token := "abvsihdbau" token := "abvsihdbau"
color := notifications.ColorInt color := notifications.ColorInt
hostname := notifications.GetHostname(command) hostname := notifications.GetHostname()
title := url.QueryEscape(notifications.GetTitle(hostname)) title := url.QueryEscape(notifications.GetTitle(hostname))
expected := fmt.Sprintf("discord://%s@%s?color=0x%x&colordebug=0x0&colorerror=0x0&colorinfo=0x0&colorwarn=0x0&title=%s&username=watchtower", token, channel, color, title) expected := fmt.Sprintf("discord://%s@%s?color=0x%x&colordebug=0x0&colorerror=0x0&colorinfo=0x0&colorwarn=0x0&title=%s&username=watchtower", token, channel, color, title)
buildArgs := func(url string) []string { buildArgs := func(url string) []string {
@ -190,11 +190,11 @@ var _ = Describe("notifications", func() {
When("converting a gotify service config into a shoutrrr url", func() { When("converting a gotify service config into a shoutrrr url", func() {
It("should return the expected URL", func() { It("should return the expected URL", func() {
command := cmd.NewRootCommand() command := cmd.NewRootCommand()
flags.RegisterNotificationFlags(command) flags.RegisterNotificationFlags()
token := "aaa" token := "aaa"
host := "shoutrrr.local" host := "shoutrrr.local"
hostname := notifications.GetHostname(command) hostname := notifications.GetHostname()
title := url.QueryEscape(notifications.GetTitle(hostname)) title := url.QueryEscape(notifications.GetTitle(hostname))
expectedOutput := fmt.Sprintf("gotify://%s/%s?title=%s", host, token, title) expectedOutput := fmt.Sprintf("gotify://%s/%s?title=%s", host, token, title)

Loading…
Cancel
Save