Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactoring: split to smalller parts #2

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 16 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Install ydb-platform/slo-tests

GIT: https://github.com/ydb-platform/slo-tests.git
Start `docker-compose up -d` to have YDB running in local container
Check that YDB has started `http://localhost:8765/monitoring/cluster/tenants`

## Install

set YDB_ANONYMOUS_CREDENTIALS=1
set YDB_SSL_ROOT_CERTIFICATES_FILE=C:\work\slo-tests\playground\data\ydb_certs\cert.pem
set YDB_SDK_LOGLEVEL=debug
npm run test:integration:development

src/__tests__/bytestring-identity.test.ts
src/__tests__/create-table.test.ts

307 changes: 0 additions & 307 deletions src/credentials.ts

This file was deleted.

9 changes: 9 additions & 0 deletions src/credentials/AnonymousAuthService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as grpc from "@grpc/grpc-js";
import {IAuthService} from "./IAuthService";

export class AnonymousAuthService implements IAuthService {
constructor() {}
public async getAuthMetadata(): Promise<grpc.Metadata> {
return new grpc.Metadata();
}
}
5 changes: 5 additions & 0 deletions src/credentials/IAuthService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as grpc from "@grpc/grpc-js";

export interface IAuthService {
getAuthMetadata: () => Promise<grpc.Metadata>,
}
6 changes: 6 additions & 0 deletions src/credentials/IIamCredentials.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface IIamCredentials {
serviceAccountId: string,
accessKeyId: string,
privateKey: Buffer,
iamEndpoint: string
}
Loading