-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
- Loading branch information
Showing
3 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,18 +9,18 @@ import ( | |
) | ||
|
||
func Test_MakeHTTPSUserdata_OneDomain(t *testing.T) { | ||
got := MakeHTTPSUserdata("token", "0.9.21", "[email protected]", "prod", []string{"example.com"}) | ||
got := MakeHTTPSUserdata("token", "0.9.25", "[email protected]", "prod", []string{"example.com"}) | ||
|
||
os.WriteFile("/tmp/t.txt", []byte(got), 0600) | ||
want := `#!/bin/bash | ||
export AUTHTOKEN="token" | ||
export IP=$(curl -sfSL https://checkip.amazonaws.com) | ||
curl -SLsf https://github.com/inlets/inlets-pro/releases/download/0.9.21/inlets-pro -o /tmp/inlets-pro && \ | ||
curl -SLsf https://github.com/inlets/inlets-pro/releases/download/0.9.25/inlets-pro -o /tmp/inlets-pro && \ | ||
chmod +x /tmp/inlets-pro && \ | ||
mv /tmp/inlets-pro /usr/local/bin/inlets-pro | ||
curl -SLsf https://github.com/inlets/inlets-pro/releases/download/0.9.21/inlets-pro-http.service -o inlets-pro.service && \ | ||
curl -SLsf https://github.com/inlets/inlets-pro/releases/download/0.9.25/inlets-pro-http.service -o inlets-pro.service && \ | ||
mv inlets-pro.service /etc/systemd/system/inlets-pro.service && \ | ||
echo "AUTHTOKEN=$AUTHTOKEN" >> /etc/default/inlets-pro && \ | ||
echo "IP=$IP" >> /etc/default/inlets-pro && \ | ||
|
@@ -37,19 +37,19 @@ curl -SLsf https://github.com/inlets/inlets-pro/releases/download/0.9.21/inlets- | |
} | ||
|
||
func Test_MakeHTTPSUserdata_TwoDomains(t *testing.T) { | ||
got := MakeHTTPSUserdata("token", "0.9.21", "[email protected]", "prod", | ||
got := MakeHTTPSUserdata("token", "0.9.25", "[email protected]", "prod", | ||
[]string{"a.example.com", "b.example.com"}) | ||
|
||
os.WriteFile("/tmp/t.txt", []byte(got), 0600) | ||
want := `#!/bin/bash | ||
export AUTHTOKEN="token" | ||
export IP=$(curl -sfSL https://checkip.amazonaws.com) | ||
curl -SLsf https://github.com/inlets/inlets-pro/releases/download/0.9.21/inlets-pro -o /tmp/inlets-pro && \ | ||
curl -SLsf https://github.com/inlets/inlets-pro/releases/download/0.9.25/inlets-pro -o /tmp/inlets-pro && \ | ||
chmod +x /tmp/inlets-pro && \ | ||
mv /tmp/inlets-pro /usr/local/bin/inlets-pro | ||
curl -SLsf https://github.com/inlets/inlets-pro/releases/download/0.9.21/inlets-pro-http.service -o inlets-pro.service && \ | ||
curl -SLsf https://github.com/inlets/inlets-pro/releases/download/0.9.25/inlets-pro-http.service -o inlets-pro.service && \ | ||
mv inlets-pro.service /etc/systemd/system/inlets-pro.service && \ | ||
echo "AUTHTOKEN=$AUTHTOKEN" >> /etc/default/inlets-pro && \ | ||
echo "IP=$IP" >> /etc/default/inlets-pro && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters