File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 28
28
sys .dont_write_bytecode = True
29
29
import os
30
30
31
- import shutil
32
31
import pathlib
33
32
import math
34
33
import datetime
@@ -90,6 +89,14 @@ def ns_to_qdb_date(at_ts_ns):
90
89
token_y = "9iYksF4L6mfmArupv0CMoyVAWjQ4gNIou5noG8" )
91
90
92
91
92
+ # All the keys are valid, but the user is wrong.
93
+ AUTH_MALFORMED3 = dict (
94
+ user = "wrongUser" ,
95
+ token = AUTH ['token' ],
96
+ token_x = AUTH ['token_x' ],
97
+ token_y = AUTH ['token_y' ])
98
+
99
+
93
100
class TestSender (unittest .TestCase ):
94
101
def _mk_linesender (self , transactional = False ):
95
102
auth = AUTH if QDB_FIXTURE .auth else {}
@@ -617,6 +624,19 @@ def test_malformed_auth2(self):
617
624
r'.*invalid Base64.*' ):
618
625
sender .connect ()
619
626
627
+ def test_malformed_auth3 (self ):
628
+ if not QDB_FIXTURE .auth :
629
+ self .skipTest ('No auth' )
630
+
631
+ sender = qls .Sender (
632
+ BUILD_MODE ,
633
+ QDB_FIXTURE .host ,
634
+ QDB_FIXTURE .line_tcp_port ,
635
+ ** AUTH_MALFORMED3 )
636
+
637
+ with sender :
638
+ self ._expect_eventual_disconnect (sender )
639
+
620
640
def test_tls_insecure_skip_verify (self ):
621
641
auth = AUTH if QDB_FIXTURE .auth else {}
622
642
sender = qls .Sender (
You can’t perform that action at this time.
0 commit comments