Skip to content

Commit

Permalink
Merge branch 'trunk' into configkey_is_not_well_formed
Browse files Browse the repository at this point in the history
  • Loading branch information
srieteja authored Oct 16, 2023
2 parents b8c48bc + 4a3cd47 commit c763d5d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@d90b8d79de6dc1f58e83a1499aa58d6c93dc28de # v2.22.2
uses: github/codeql-action/init@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -60,7 +60,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@d90b8d79de6dc1f58e83a1499aa58d6c93dc28de # v2.22.2
uses: github/codeql-action/autobuild@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -73,6 +73,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@d90b8d79de6dc1f58e83a1499aa58d6c93dc28de # v2.22.2
uses: github/codeql-action/analyze@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@d90b8d79de6dc1f58e83a1499aa58d6c93dc28de # v2.13.4
uses: github/codeql-action/upload-sarif@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
with:
sarif_file: results.sarif
10 changes: 7 additions & 3 deletions tests/at_functional_test/test/check_docker_readiness.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@ void main() {

test('checking for test environment readiness', () async {
_secureSocket = await secure_socket_connection(rootServer, atsignPort);
print('connection established');
socket_listener(_secureSocket);
String response = '';
while (response.isEmpty || response == 'data:null\n') {
while ((retryCount < maxRetryCount) &&
(response.isEmpty || response == 'data:null\n')) {
_secureSocket.write('lookup:signing_publickey$atsign\n');
response = await read();
print('waiting for signing public key response : $response');
await Future.delayed(Duration(milliseconds: 100));
if (response.startsWith('data:')) {
break;
}
}
await _secureSocket.close();
}, timeout: Timeout(Duration(minutes: 1)));
expect(response.startsWith('data:'), true);
});
}
14 changes: 9 additions & 5 deletions tests/at_functional_test/test/check_root_server_readiness.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ void main() {

late SecureSocket _secureSocket;

bool isRootServerStarted = false;

test('checking for root server readiness', () async {
while (retryCount < maxRetryCount) {
try {
Expand All @@ -25,16 +27,17 @@ void main() {
if (response == '@') {
print('Secure Socket is open for Root Server');
}
var isRootServerStarted =
await _lookupForSecondaryAddress(_secureSocket, atSign, rootServer);
isRootServerStarted =
await _lookupForSecondaryAddress(_secureSocket, atSign, rootServer);
if (isRootServerStarted) {
print('Closing socket connection');
print('Root server started successfully');
_secureSocket.close();
break;
} else {
print('Failed to start root server');
print('Root server is not completely initialized');
_secureSocket.close();
break;
retryCount = retryCount + 1;
await Future.delayed(Duration(seconds: 5));
}
} on SocketException {
print('Waiting for the root server to start: RetryCount: $retryCount');
Expand All @@ -46,6 +49,7 @@ void main() {
retryCount = retryCount + 1;
}
}
expect(isRootServerStarted, true, reason: 'Failed to start root server successfully');
}, timeout: Timeout(Duration(minutes: 1)));
}

Expand Down
14 changes: 12 additions & 2 deletions tests/at_functional_test/test/check_test_env.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,28 @@ void main() {
var rootServer = 'vip.ve.atsign.zone';
var atsign = '@sitaram🛠';
var atsignPort = 25017;
bool arePKAMKeysLoaded = false;
int maxRetryCount = 10;
int retryCount = 1;

test('checking for test environment readiness', () async {
_secureSocket = await secure_socket_connection(rootServer, atsignPort);
print('connection established');
socket_listener(_secureSocket);
String response = '';
while (response.isEmpty || response.startsWith('error:')) {
while ((retryCount < maxRetryCount) &&
(response.isEmpty || response.startsWith('error:'))) {
_secureSocket.write('lookup:pkaminstalled$atsign\n');
response = await read();
print('Waiting for PKAM keys to load : $response');
if (response.startsWith('data:')) {
arePKAMKeysLoaded = true;
break;
}
await Future.delayed(Duration(seconds: 1));
}
await _secureSocket.close();
}, timeout: Timeout(Duration(minutes: 1)));
expect(arePKAMKeysLoaded, true,
reason: 'PKAM Keys are not loaded successfully');
});
}

0 comments on commit c763d5d

Please sign in to comment.