mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Code cleanup in KerberosInit and kafka integration tests
This commit is contained in:
parent
d1d6d87432
commit
4c560584c7
@ -20,7 +20,7 @@ struct k5_data
|
||||
krb5_context ctx;
|
||||
krb5_ccache in_cc, out_cc;
|
||||
krb5_principal me;
|
||||
char *name;
|
||||
char * name;
|
||||
krb5_boolean switch_to_cache;
|
||||
};
|
||||
|
||||
@ -30,11 +30,9 @@ public:
|
||||
int init(const String & keytab_file, const String & principal, const String & cache_name = "");
|
||||
~KerberosInit();
|
||||
private:
|
||||
//struct k5_data * k5 = nullptr;
|
||||
struct k5_data k5;
|
||||
//struct k5_data k5d;
|
||||
krb5_ccache defcache = nullptr;
|
||||
krb5_get_init_creds_opt *options = nullptr;
|
||||
krb5_get_init_creds_opt * options = nullptr;
|
||||
krb5_creds my_creds;
|
||||
krb5_keytab keytab = nullptr;
|
||||
krb5_principal defcache_princ = nullptr;
|
||||
|
@ -127,6 +127,7 @@ def test_kafka_json_as_string(kafka_cluster):
|
||||
"Parsing of message (topic: kafka_json_as_string, partition: 0, offset: 1) return no rows"
|
||||
)
|
||||
|
||||
|
||||
def test_kafka_json_as_string_request_new_ticket_after_expiration(kafka_cluster):
|
||||
# Ticket should be expired after the wait time
|
||||
# On run of SELECT query new ticket should be requested and SELECT query should run fine.
|
||||
@ -155,7 +156,7 @@ def test_kafka_json_as_string_request_new_ticket_after_expiration(kafka_cluster)
|
||||
"""
|
||||
)
|
||||
|
||||
time.sleep(45) # wait for ticket expiration
|
||||
time.sleep(45) # wait for ticket expiration
|
||||
|
||||
result = instance.query("SELECT * FROM test.kafka;")
|
||||
expected = """\
|
||||
@ -168,6 +169,7 @@ def test_kafka_json_as_string_request_new_ticket_after_expiration(kafka_cluster)
|
||||
"Parsing of message (topic: kafka_json_as_string, partition: 0, offset: 1) return no rows"
|
||||
)
|
||||
|
||||
|
||||
def test_kafka_json_as_string_no_kdc(kafka_cluster):
|
||||
# When the test is run alone (not preceded by any other kerberized kafka test),
|
||||
# we need a ticket to
|
||||
@ -222,7 +224,6 @@ def test_kafka_json_as_string_no_kdc(kafka_cluster):
|
||||
assert TSV(result) == TSV(expected)
|
||||
assert instance.contains_in_log("StorageKafka (kafka_no_kdc): Nothing to commit")
|
||||
assert instance.contains_in_log("Ticket expired")
|
||||
#~ assert instance.contains_in_log("Kerberos ticket refresh failed")
|
||||
assert instance.contains_in_log("KerberosInit failure:")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user