summaryrefslogtreecommitdiff
path: root/tests/configs
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2019-09-30 12:23:00 -0400
committerJeff Forcier <jeff@bitprophet.org>2019-12-02 21:06:53 -0500
commit004462b40ea156b783456463b042a8f71bd22d1e (patch)
tree7de6b49927dbbc86455461d532a3a98e21f0adcd /tests/configs
parentc99388364bb840677e9ea27c7755f4a0af621e1b (diff)
downloadparamiko-004462b40ea156b783456463b042a8f71bd22d1e.tar.gz
Base case re #717 works now.
Huge ass squashed commit because I was experimenting with "commit entire feature at once so you do not leave broken tests around to break bisecting". Not sure it's worth it, at least not for large-ish, overhauling-existing-code feature adds. Breaking the work up over months did not help either, L M A O
Diffstat (limited to 'tests/configs')
-rw-r--r--tests/configs/basic (renamed from tests/configs/basic.config)1
-rw-r--r--tests/configs/canon (renamed from tests/configs/canon.config)1
-rw-r--r--tests/configs/canon-always (renamed from tests/configs/canon-always.config)1
-rw-r--r--tests/configs/canon-ipv4 (renamed from tests/configs/canon-ipv4.config)1
-rw-r--r--tests/configs/canon-local (renamed from tests/configs/canon-local.config)1
-rw-r--r--tests/configs/canon-local-always (renamed from tests/configs/canon-local-always.config)1
-rw-r--r--tests/configs/deep-canon (renamed from tests/configs/deep-canon.config)1
-rw-r--r--tests/configs/deep-canon-maxdots (renamed from tests/configs/deep-canon-maxdots.config)1
-rw-r--r--tests/configs/empty-canon (renamed from tests/configs/empty-canon.config)1
-rw-r--r--tests/configs/fallback-no (renamed from tests/configs/fallback-no.config)1
-rw-r--r--tests/configs/fallback-yes (renamed from tests/configs/fallback-yes.config)1
-rw-r--r--tests/configs/invalid1
-rw-r--r--tests/configs/match-all2
-rw-r--r--tests/configs/match-all-after-canonical6
-rw-r--r--tests/configs/match-all-and-more3
-rw-r--r--tests/configs/match-all-and-more-before3
-rw-r--r--tests/configs/match-all-before-canonical6
-rw-r--r--tests/configs/match-canonical-no7
-rw-r--r--tests/configs/match-canonical-yes6
-rw-r--r--tests/configs/match-complex17
-rw-r--r--tests/configs/match-exec8
-rw-r--r--tests/configs/match-host3
-rw-r--r--tests/configs/match-host-canonicalized10
-rw-r--r--tests/configs/match-host-from-match6
-rw-r--r--tests/configs/match-host-glob4
-rw-r--r--tests/configs/match-host-glob-list10
-rw-r--r--tests/configs/match-host-name5
-rw-r--r--tests/configs/match-host-negated2
-rw-r--r--tests/configs/match-host-no-arg3
-rw-r--r--tests/configs/match-localuser14
-rw-r--r--tests/configs/match-localuser-no-arg2
-rw-r--r--tests/configs/match-orighost16
-rw-r--r--tests/configs/match-orighost-canonical5
-rw-r--r--tests/configs/match-orighost-no-arg3
-rw-r--r--tests/configs/match-user14
-rw-r--r--tests/configs/match-user-explicit4
-rw-r--r--tests/configs/match-user-no-arg2
-rw-r--r--tests/configs/multi-canon-domains (renamed from tests/configs/multi-canon-domains.config)1
-rw-r--r--tests/configs/no-canon (renamed from tests/configs/no-canon.config)1
-rw-r--r--tests/configs/robey (renamed from tests/configs/robey.config)1
-rw-r--r--tests/configs/zero-maxdots (renamed from tests/configs/zero-maxdots.config)1
41 files changed, 162 insertions, 15 deletions
diff --git a/tests/configs/basic.config b/tests/configs/basic
index 1ae37cc6..73872b47 100644
--- a/tests/configs/basic.config
+++ b/tests/configs/basic
@@ -3,4 +3,3 @@ CanonicalDomains paramiko.org
Host www.paramiko.org
User rando
-# vim: set ft=sshconfig :
diff --git a/tests/configs/canon.config b/tests/configs/canon
index 7a7ce6c6..3a3cc66a 100644
--- a/tests/configs/canon.config
+++ b/tests/configs/canon
@@ -8,4 +8,3 @@ Host www.paramiko.org
IdentityFile canonicalized.key
-# vim: set ft=sshconfig :
diff --git a/tests/configs/canon-always.config b/tests/configs/canon-always
index 85058a14..fdaeabd4 100644
--- a/tests/configs/canon-always.config
+++ b/tests/configs/canon-always
@@ -5,4 +5,3 @@ Host www.paramiko.org
User rando
-# vim: set ft=sshconfig :
diff --git a/tests/configs/canon-ipv4.config b/tests/configs/canon-ipv4
index 9f48273e..b29766a3 100644
--- a/tests/configs/canon-ipv4.config
+++ b/tests/configs/canon-ipv4
@@ -6,4 +6,3 @@ Host www.paramiko.org
User rando
-# vim: set ft=sshconfig :
diff --git a/tests/configs/canon-local.config b/tests/configs/canon-local
index 418f7723..0b5588ca 100644
--- a/tests/configs/canon-local.config
+++ b/tests/configs/canon-local
@@ -6,4 +6,3 @@ Host www
CanonicalizeHostname yes
-# vim: set ft=sshconfig :
diff --git a/tests/configs/canon-local-always.config b/tests/configs/canon-local-always
index c821d113..5c059ae1 100644
--- a/tests/configs/canon-local-always.config
+++ b/tests/configs/canon-local-always
@@ -6,4 +6,3 @@ Host www
CanonicalizeHostname always
-# vim: set ft=sshconfig :
diff --git a/tests/configs/deep-canon.config b/tests/configs/deep-canon
index 3c111f48..bb3ed5ad 100644
--- a/tests/configs/deep-canon.config
+++ b/tests/configs/deep-canon
@@ -10,4 +10,3 @@ Host sub.www.paramiko.org
Host subber.sub.www.paramiko.org
User deeper
-# vim: set ft=sshconfig :
diff --git a/tests/configs/deep-canon-maxdots.config b/tests/configs/deep-canon-maxdots
index 37a82e72..9262cc58 100644
--- a/tests/configs/deep-canon-maxdots.config
+++ b/tests/configs/deep-canon-maxdots
@@ -11,4 +11,3 @@ Host sub.www.paramiko.org
Host subber.sub.www.paramiko.org
User deeper
-# vim: set ft=sshconfig :
diff --git a/tests/configs/empty-canon.config b/tests/configs/empty-canon
index f268a2ca..d29b30fa 100644
--- a/tests/configs/empty-canon.config
+++ b/tests/configs/empty-canon
@@ -6,4 +6,3 @@ Host www.paramiko.org
User rando
-# vim: set ft=sshconfig :
diff --git a/tests/configs/fallback-no.config b/tests/configs/fallback-no
index 86b6a484..d68bfe66 100644
--- a/tests/configs/fallback-no.config
+++ b/tests/configs/fallback-no
@@ -6,4 +6,3 @@ Host www.paramiko.org
User rando
-# vim: set ft=sshconfig :
diff --git a/tests/configs/fallback-yes.config b/tests/configs/fallback-yes
index a07064a0..a87764a8 100644
--- a/tests/configs/fallback-yes.config
+++ b/tests/configs/fallback-yes
@@ -5,4 +5,3 @@ CanonicalizeFallbackLocal yes
Host www.paramiko.org
User rando
-# vim: set ft=sshconfig :
diff --git a/tests/configs/invalid b/tests/configs/invalid
new file mode 100644
index 00000000..81332fe8
--- /dev/null
+++ b/tests/configs/invalid
@@ -0,0 +1 @@
+lolwut
diff --git a/tests/configs/match-all b/tests/configs/match-all
new file mode 100644
index 00000000..7673e0a0
--- /dev/null
+++ b/tests/configs/match-all
@@ -0,0 +1,2 @@
+Match all
+ User awesome
diff --git a/tests/configs/match-all-after-canonical b/tests/configs/match-all-after-canonical
new file mode 100644
index 00000000..2acc3a6e
--- /dev/null
+++ b/tests/configs/match-all-after-canonical
@@ -0,0 +1,6 @@
+CanonicalizeHostname yes
+CanonicalDomains paramiko.org
+
+Match canonical all
+ User awesome
+
diff --git a/tests/configs/match-all-and-more b/tests/configs/match-all-and-more
new file mode 100644
index 00000000..2281d238
--- /dev/null
+++ b/tests/configs/match-all-and-more
@@ -0,0 +1,3 @@
+Match all exec "lol nope"
+ HostName whatever
+
diff --git a/tests/configs/match-all-and-more-before b/tests/configs/match-all-and-more-before
new file mode 100644
index 00000000..89a737ee
--- /dev/null
+++ b/tests/configs/match-all-and-more-before
@@ -0,0 +1,3 @@
+Match exec "lol nope" all
+ HostName whatever
+
diff --git a/tests/configs/match-all-before-canonical b/tests/configs/match-all-before-canonical
new file mode 100644
index 00000000..fe0e6646
--- /dev/null
+++ b/tests/configs/match-all-before-canonical
@@ -0,0 +1,6 @@
+CanonicalizeHostname yes
+CanonicalDomains paramiko.org
+
+Match all canonical
+ User oops
+
diff --git a/tests/configs/match-canonical-no b/tests/configs/match-canonical-no
new file mode 100644
index 00000000..e528dc64
--- /dev/null
+++ b/tests/configs/match-canonical-no
@@ -0,0 +1,7 @@
+CanonicalizeHostname no
+
+Match canonical all
+ User awesome
+
+Match !canonical host specific
+ User overload
diff --git a/tests/configs/match-canonical-yes b/tests/configs/match-canonical-yes
new file mode 100644
index 00000000..5c5759c7
--- /dev/null
+++ b/tests/configs/match-canonical-yes
@@ -0,0 +1,6 @@
+CanonicalizeHostname yes
+CanonicalDomains paramiko.org
+
+Match !canonical host www*
+ User hidden
+
diff --git a/tests/configs/match-complex b/tests/configs/match-complex
new file mode 100644
index 00000000..63634039
--- /dev/null
+++ b/tests/configs/match-complex
@@ -0,0 +1,17 @@
+HostName bogus
+
+Match originalhost target host bogus
+ User rand
+
+Match originalhost remote localuser rando
+ User calrissian
+
+# Just to set user for subsequent match
+Match originalhost www
+ User calrissian
+
+Match !canonical originalhost www host bogus localuser rando user calrissian
+ Port 7777
+
+Match !canonical !originalhost www host bogus localuser rando !user calrissian
+ Port 1234
diff --git a/tests/configs/match-exec b/tests/configs/match-exec
new file mode 100644
index 00000000..88d3f769
--- /dev/null
+++ b/tests/configs/match-exec
@@ -0,0 +1,8 @@
+Match exec "quoted"
+ User benjamin
+
+Match exec unquoted
+ User rando
+
+Match exec "quoted spaced"
+ User neil
diff --git a/tests/configs/match-host b/tests/configs/match-host
new file mode 100644
index 00000000..8259fc6b
--- /dev/null
+++ b/tests/configs/match-host
@@ -0,0 +1,3 @@
+Match host target
+ User rand
+
diff --git a/tests/configs/match-host-canonicalized b/tests/configs/match-host-canonicalized
new file mode 100644
index 00000000..347242a0
--- /dev/null
+++ b/tests/configs/match-host-canonicalized
@@ -0,0 +1,10 @@
+CanonicalizeHostname yes
+CanonicalDomains paramiko.org
+
+Match host www.paramiko.org
+ User rand
+
+Match canonical host docs.paramiko.org
+ User eric
+
+
diff --git a/tests/configs/match-host-from-match b/tests/configs/match-host-from-match
new file mode 100644
index 00000000..64b4c4b5
--- /dev/null
+++ b/tests/configs/match-host-from-match
@@ -0,0 +1,6 @@
+Match host original-host
+ HostName substituted-host
+
+Match host substituted-host
+ User inner
+
diff --git a/tests/configs/match-host-glob b/tests/configs/match-host-glob
new file mode 100644
index 00000000..9c198ce3
--- /dev/null
+++ b/tests/configs/match-host-glob
@@ -0,0 +1,4 @@
+Match host *ever
+ User matrim
+
+
diff --git a/tests/configs/match-host-glob-list b/tests/configs/match-host-glob-list
new file mode 100644
index 00000000..76796777
--- /dev/null
+++ b/tests/configs/match-host-glob-list
@@ -0,0 +1,10 @@
+Match host *ever
+ User matrim
+
+Match host somehost,someotherhost
+ User thom
+
+Match host goo*,!goof
+ User perrin
+
+
diff --git a/tests/configs/match-host-name b/tests/configs/match-host-name
new file mode 100644
index 00000000..5b4adb84
--- /dev/null
+++ b/tests/configs/match-host-name
@@ -0,0 +1,5 @@
+HostName default-host
+
+Match host default-host
+ User silly
+
diff --git a/tests/configs/match-host-negated b/tests/configs/match-host-negated
new file mode 100644
index 00000000..7c5d3f3e
--- /dev/null
+++ b/tests/configs/match-host-negated
@@ -0,0 +1,2 @@
+Match !host www
+ User jeff
diff --git a/tests/configs/match-host-no-arg b/tests/configs/match-host-no-arg
new file mode 100644
index 00000000..e9936844
--- /dev/null
+++ b/tests/configs/match-host-no-arg
@@ -0,0 +1,3 @@
+Match host
+ User oops
+
diff --git a/tests/configs/match-localuser b/tests/configs/match-localuser
new file mode 100644
index 00000000..fe4a276c
--- /dev/null
+++ b/tests/configs/match-localuser
@@ -0,0 +1,14 @@
+Match localuser gandalf
+ HostName gondor
+
+Match localuser b*
+ HostName shire
+
+Match localuser aragorn,frodo
+ HostName moria
+
+Match localuser gimli,!legolas
+ Port 7373
+
+Match !localuser sauron
+ HostName mordor
diff --git a/tests/configs/match-localuser-no-arg b/tests/configs/match-localuser-no-arg
new file mode 100644
index 00000000..6623553a
--- /dev/null
+++ b/tests/configs/match-localuser-no-arg
@@ -0,0 +1,2 @@
+Match localuser
+ User oops
diff --git a/tests/configs/match-orighost b/tests/configs/match-orighost
new file mode 100644
index 00000000..10541993
--- /dev/null
+++ b/tests/configs/match-orighost
@@ -0,0 +1,16 @@
+HostName bogus
+
+Match originalhost target
+ User tuon
+
+Match originalhost what*
+ User matrim
+
+Match originalhost comma,sep*
+ User chameleon
+
+Match originalhost yep,!nope
+ User skipped
+
+Match !originalhost www !originalhost nope
+ User thom
diff --git a/tests/configs/match-orighost-canonical b/tests/configs/match-orighost-canonical
new file mode 100644
index 00000000..737345e8
--- /dev/null
+++ b/tests/configs/match-orighost-canonical
@@ -0,0 +1,5 @@
+CanonicalizeHostname yes
+CanonicalDomains paramiko.org
+
+Match originalhost www
+ User tuon
diff --git a/tests/configs/match-orighost-no-arg b/tests/configs/match-orighost-no-arg
new file mode 100644
index 00000000..ebf81fa0
--- /dev/null
+++ b/tests/configs/match-orighost-no-arg
@@ -0,0 +1,3 @@
+Match originalhost
+ User oops
+
diff --git a/tests/configs/match-user b/tests/configs/match-user
new file mode 100644
index 00000000..14d6ac12
--- /dev/null
+++ b/tests/configs/match-user
@@ -0,0 +1,14 @@
+Match user gandalf
+ HostName gondor
+
+Match user b*
+ HostName shire
+
+Match user aragorn,frodo
+ HostName moria
+
+Match user gimli,!legolas
+ Port 7373
+
+Match !user sauron
+ HostName mordor
diff --git a/tests/configs/match-user-explicit b/tests/configs/match-user-explicit
new file mode 100644
index 00000000..9a2b1d82
--- /dev/null
+++ b/tests/configs/match-user-explicit
@@ -0,0 +1,4 @@
+User explicit
+
+Match user explicit
+ HostName dumb
diff --git a/tests/configs/match-user-no-arg b/tests/configs/match-user-no-arg
new file mode 100644
index 00000000..65a11ab4
--- /dev/null
+++ b/tests/configs/match-user-no-arg
@@ -0,0 +1,2 @@
+Match user
+ User oops
diff --git a/tests/configs/multi-canon-domains.config b/tests/configs/multi-canon-domains
index f0cf521d..0fe98e31 100644
--- a/tests/configs/multi-canon-domains.config
+++ b/tests/configs/multi-canon-domains
@@ -5,4 +5,3 @@ Host www.paramiko.org
User rando
-# vim: set ft=sshconfig :
diff --git a/tests/configs/no-canon.config b/tests/configs/no-canon
index bd48b790..62e8f713 100644
--- a/tests/configs/no-canon.config
+++ b/tests/configs/no-canon
@@ -5,4 +5,3 @@ Host www.paramiko.org
User rando
-# vim: set ft=sshconfig :
diff --git a/tests/configs/robey.config b/tests/configs/robey
index 2175182f..b2026224 100644
--- a/tests/configs/robey.config
+++ b/tests/configs/robey
@@ -15,4 +15,3 @@ Host *
Host spoo.example.com
Crazy something else
-# vim: set ft=sshconfig list :
diff --git a/tests/configs/zero-maxdots.config b/tests/configs/zero-maxdots
index c7a095ab..eae90285 100644
--- a/tests/configs/zero-maxdots.config
+++ b/tests/configs/zero-maxdots
@@ -8,4 +8,3 @@ Host www.paramiko.org
Host sub.www.paramiko.org
User deep
-# vim: set ft=sshconfig :