Visitar URL original
comprehensive test coverage, token auth, and code quality improvement… · ArcadeData/arcadedb@eb0d72a · GitHub
Skip to content

Commit eb0d72a

Browse files
authored
comprehensive test coverage, token auth, and code quality improvements (#3306)
Test Coverage: - Add GrpcAdminServiceIT with ping, server info, database listing, create/drop, and info tests - Add GrpcServerIT with query, command, CRUD, transaction, streaming, and bulk insert tests - Add unit tests for GrpcServerPlugin, GrpcAuthInterceptor, GrpcLoggingInterceptor, GrpcMetricsInterceptor, GrpcCompressionInterceptor, and CompressionAwareService - Add GrpcTypeConverter unit tests for complex types and round-trip conversions Token Authentication: - Implement Bearer token authentication via GrpcAuthInterceptor - Integrate HttpAuthSessionManager for session validation - Share authentication tokens between HTTP and gRPC APIs Refactoring: - Extract GrpcTypeConverter with timestamp helpers, value conversion, and parameter handling - Replace reflection-based server info with direct API calls - Return UNIMPLEMENTED for user management endpoints (not yet supported) Code Quality Fixes: - Fix grpcService field assignment (prevented NPE on shutdown) - Add null check for database in getDatabaseInfo() - Simplify vertex type detection using Stream.anyMatch() Documentation: - Add comprehensive gRPC API documentation (docs/gRPC-API.md)
1 parent c7cd467 commit eb0d72a

16 files changed

Lines changed: 3000 additions & 264 deletions

‎docs/gRPC-API.md‎

Lines changed: 490 additions & 0 deletions
Large diffs are not rendered by default.

‎grpcw/pom.xml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,31 @@
5454
<version>${project.parent.version}</version>
5555
<scope>test</scope>
5656
</dependency>
57+
<dependency>
58+
<groupId>com.arcadedb</groupId>
59+
<artifactId>arcadedb-server</artifactId>
60+
<version>${project.parent.version}</version>
61+
<scope>test</scope>
62+
<type>test-jar</type>
63+
</dependency>
64+
<dependency>
65+
<groupId>io.grpc</groupId>
66+
<artifactId>grpc-testing</artifactId>
67+
<version>${grpc.version}</version>
68+
<scope>test</scope>
69+
<exclusions>
70+
<exclusion>
71+
<groupId>junit</groupId>
72+
<artifactId>junit</artifactId>
73+
</exclusion>
74+
</exclusions>
75+
</dependency>
76+
<dependency>
77+
<groupId>org.mockito</groupId>
78+
<artifactId>mockito-core</artifactId>
79+
<version>${mockito-core.version}</version>
80+
<scope>test</scope>
81+
</dependency>
5782
</dependencies>
5883

5984
<build>

0 commit comments

Comments
 (0)