Fix remaining failing tests

This commit is contained in:
Kovid Goyal
2023-02-25 10:27:01 +05:30
parent dc938cf3dd
commit 5cc3d3cbfe
8 changed files with 33 additions and 22 deletions

View File

@@ -23,10 +23,13 @@ func TestSSHConfigParsing(t *testing.T) {
cf := filepath.Join(tdir, "ssh.conf")
rt := func(expected_env ...string) {
os.WriteFile(cf, []byte(conf), 0o600)
c, err := load_config(hostname, username, nil, cf)
c, bad_lines, err := load_config(hostname, username, nil, cf)
if err != nil {
t.Fatal(err)
}
if len(bad_lines) != 0 {
t.Fatalf("Bad config line: %s with error: %s", bad_lines[0].Line, bad_lines[0].Err)
}
actual := final_env_instructions(for_python, func(key string) (string, bool) {
if key == "LOCAL_ENV" {
return "LOCAL_VAL", true