mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-25 22:42:04 +02:00
explicitly enable bash job mode + don't call gvm cause it isn't necessary
This commit is contained in:
parent
6f7e034837
commit
3619bd5447
@ -17,7 +17,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func RunInteractiveBashCommands(t *testing.T, script string) string {
|
func RunInteractiveBashCommands(t *testing.T, script string) string {
|
||||||
out, err := RunInteractiveBashCommandsWithoutStrictMode(t, "set -eo pipefail\n"+script)
|
out, err := RunInteractiveBashCommandsWithoutStrictMode(t, "set -emo pipefail\n"+script)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("error when running command: %v", err)
|
t.Fatalf("error when running command: %v", err)
|
||||||
}
|
}
|
||||||
@ -151,14 +151,13 @@ func TestIntegrationWithNewDevice(t *testing.T) {
|
|||||||
// Finally, test the export command
|
// Finally, test the export command
|
||||||
out = RunInteractiveBashCommands(t, `hishtory export`)
|
out = RunInteractiveBashCommands(t, `hishtory export`)
|
||||||
if out != fmt.Sprintf(
|
if out != fmt.Sprintf(
|
||||||
"/tmp/client install\nset -eo pipefail\nset -eo pipefail\nhishtory status\nset -eo pipefail\nhishtory query\nhishtory query\nls /a\nls /bar\nls /foo\necho foo\necho bar\nhishtory enable\necho thisisrecorded\nset -eo pipefail\nhishtory query\nset -eo pipefail\nhishtory query foo\n/tmp/client install %s\nset -eo pipefail\nhishtory query\nset -eo pipefail\necho mynewcommand\nset -eo pipefail\nhishtory query\nhishtory init %s\nset -eo pipefail\nhishtory query\nset -eo pipefail\necho mynewercommand\nset -eo pipefail\nhishtory query\nothercomputer\nset -eo pipefail\nhishtory query\nset -eo pipefail\n", userSecret, userSecret) {
|
"/tmp/client install\nset -emo pipefail\nset -emo pipefail\nhishtory status\nset -emo pipefail\nhishtory query\nhishtory query\nls /a\nls /bar\nls /foo\necho foo\necho bar\nhishtory enable\necho thisisrecorded\nset -emo pipefail\nhishtory query\nset -emo pipefail\nhishtory query foo\n/tmp/client install %s\nset -emo pipefail\nhishtory query\nset -emo pipefail\necho mynewcommand\nset -emo pipefail\nhishtory query\nhishtory init %s\nset -emo pipefail\nhishtory query\nset -emo pipefail\necho mynewercommand\nset -emo pipefail\nhishtory query\nothercomputer\nset -emo pipefail\nhishtory query\nset -emo pipefail\n", userSecret, userSecret) {
|
||||||
t.Fatalf("hishtory export had unexpected output! out=%#v", out)
|
t.Fatalf("hishtory export had unexpected output! out=%#v", out)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func installHishtory(t *testing.T, userSecret string) string {
|
func installHishtory(t *testing.T, userSecret string) string {
|
||||||
out := RunInteractiveBashCommands(t, `
|
out := RunInteractiveBashCommands(t, `
|
||||||
gvm use go1.17
|
|
||||||
go build -o /tmp/client
|
go build -o /tmp/client
|
||||||
/tmp/client install `+userSecret)
|
/tmp/client install `+userSecret)
|
||||||
r := regexp.MustCompile(`Setting secret hishtory key to (.*)`)
|
r := regexp.MustCompile(`Setting secret hishtory key to (.*)`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user