Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
setup environment variable for websocket test
  • Loading branch information
xiazhvera committed Jun 16, 2025
commit d3af16842cd2d69e4866be520a6b275d06aad73e
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ public static AWSIotMqttClient newClient(String clientEndpoint, String clientId,
String privateMaterial = CredentialUtil.getSecret(privateMateiralARN);

if (isWebSocket == false) {
return newMqttTlsClient(clientEndpoint, clientId+TEST_UID, publicMaterial,
privateMaterial);
return newMqttTlsClient(clientEndpoint, clientId+TEST_UID, publicMaterial, privateMaterial);
} else {
return new AWSIotMqttClient(clientEndpoint, clientId+TEST_UID, publicMaterial, privateMaterial);
// For WebSocket, the public material is the AWS access key id and the private material is the AWS secret access key.
// Grab the test info from environment variables.
String accessKeyId = System.getenv("AWS_ACCESS_KEY_ID");
String privateKey = System.getenv("AWS_SECRET_ACCESS_KEY");
String sessionToken = System.getenv("AWS_SESSION_TOKEN");
return new AWSIotMqttClient(clientEndpoint, clientId+TEST_UID, accessKeyId, privateKey, sessionToken);
}
}

Expand Down
Loading