Skip to content

Commit

Permalink
idebug
Browse files Browse the repository at this point in the history
  • Loading branch information
sunbit committed Jan 15, 2025
1 parent 50fe440 commit fc05494
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions nuclia_e2e/nuclia_e2e/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,22 @@
},
}

import base64
import json


# Assuming CLUSTERS_CONFIG is already defined
# Function to split a string into chunks of a specific size
def split_into_chunks(text, chunk_size):
return [text[i:i + chunk_size] for i in range(0, len(text), chunk_size)]


# Iterate through each zone in the config and process the keys
for zone in CLUSTERS_CONFIG["prod"]["zones"]:
# Extract the permanent_nua_key
key = zone["permanent_nua_key"]

# Split the key into chunks of 100 characters
chunks = split_into_chunks(key, 100)

# Encode each chunk in Base64
encoded_chunks = [base64.b64encode(chunk.encode()).decode() for chunk in chunks]

print(encoded_chunks)
# Print each chunk individually
for chunk in chunks:
print(chunk)

class ManagerAPI:
def __init__(self, global_api, session: aiohttp.ClientSession):
Expand Down

0 comments on commit fc05494

Please sign in to comment.