UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

102 lines (101 loc) 5.09 kB
/** * SPDX-License-Identifier: Apache-2.0 */ import 'chai-as-promised'; import { ClusterCommand } from '../src/commands/cluster/index.js'; import { InitCommand } from '../src/commands/init.js'; import { NetworkCommand } from '../src/commands/network.js'; import { NodeCommand } from '../src/commands/node/index.js'; import { type DependencyManager } from '../src/core/dependency_managers/index.js'; import { AccountCommand } from '../src/commands/account.js'; import { type SoloLogger } from '../src/core/logging.js'; import { type BaseCommand } from '../src/commands/base.js'; import { type NodeAlias } from '../src/types/aliases.js'; import { type NetworkNodeServices } from '../src/core/network_node_services.js'; import { type K8Factory } from '../src/core/kube/k8_factory.js'; import { type AccountManager } from '../src/core/account_manager.js'; import { type PlatformInstaller } from '../src/core/platform_installer.js'; import { type ProfileManager } from '../src/core/profile_manager.js'; import { type LeaseManager } from '../src/core/lease/lease_manager.js'; import { type CertificateManager } from '../src/core/certificate_manager.js'; import { type LocalConfig } from '../src/core/config/local_config.js'; import { type RemoteConfigManager } from '../src/core/config/remote/remote_config_manager.js'; import { type ConfigManager } from '../src/core/config_manager.js'; import { type Helm } from '../src/core/helm.js'; import { type ChartManager } from '../src/core/chart_manager.js'; import { type PackageDownloader } from '../src/core/package_downloader.js'; import { type KeyManager } from '../src/core/key_manager.js'; import { NamespaceName } from '../src/core/kube/resources/namespace/namespace_name.js'; import { DeploymentCommand } from '../src/commands/deployment.js'; export declare const TEST_CLUSTER: string; export declare const HEDERA_PLATFORM_VERSION_TAG = "v0.58.10"; export declare const BASE_TEST_DIR: string; export declare let testLogger: SoloLogger; export declare function getTestCacheDir(testName?: string): string; export declare function getTmpDir(): string; /** Get argv with defaults */ export declare function getDefaultArgv(namespace: NamespaceName): Record<string, any>; interface TestOpts { logger: SoloLogger; helm: Helm; k8Factory: K8Factory; chartManager: ChartManager; configManager: ConfigManager; downloader: PackageDownloader; platformInstaller: PlatformInstaller; depManager: DependencyManager; keyManager: KeyManager; accountManager: AccountManager; cacheDir: string; profileManager: ProfileManager; leaseManager: LeaseManager; certificateManager: CertificateManager; remoteConfigManager: RemoteConfigManager; localConfig: LocalConfig; } interface BootstrapResponse { deployment: string; namespace: NamespaceName; opts: TestOpts; manager: { accountManager: AccountManager; }; cmd: { initCmd: InitCommand; clusterCmd: ClusterCommand; networkCmd: NetworkCommand; nodeCmd: NodeCommand; accountCmd: AccountCommand; deploymentCmd: DeploymentCommand; }; } /** Initialize common test variables */ export declare function bootstrapTestVariables(testName: string, argv: any, k8FactoryArg?: K8Factory | null, initCmdArg?: InitCommand | null, clusterCmdArg?: ClusterCommand | null, networkCmdArg?: NetworkCommand | null, nodeCmdArg?: NodeCommand | null, accountCmdArg?: AccountCommand | null, deploymentCmdArg?: DeploymentCommand | null): BootstrapResponse; /** Bootstrap network in a given namespace, then run the test call back providing the bootstrap response */ export declare function e2eTestSuite(testName: string, argv: Record<any, any>, k8FactoryArg?: K8Factory | null, initCmdArg?: InitCommand | null, clusterCmdArg?: ClusterCommand | null, networkCmdArg?: NetworkCommand | null, nodeCmdArg?: NodeCommand | null, accountCmdArg?: AccountCommand | null, startNodes?: boolean, testsCallBack?: (bootstrapResp: BootstrapResponse) => void): void; export declare function balanceQueryShouldSucceed(accountManager: AccountManager, cmd: BaseCommand, namespace: NamespaceName, skipNodeAlias?: NodeAlias): void; export declare function accountCreationShouldSucceed(accountManager: AccountManager, nodeCmd: BaseCommand, namespace: NamespaceName, skipNodeAlias?: NodeAlias): void; export declare function getNodeAliasesPrivateKeysHash(networkNodeServicesMap: Map<NodeAlias, NetworkNodeServices>, k8Factory: K8Factory, destDir: string): Promise<Map<`node${number}`, Map<string, string>>>; export declare const testLocalConfigData: { userEmailAddress: string; soloVersion: string; deployments: { deployment: { clusters: string[]; namespace: string; }; 'deployment-2': { clusters: string[]; namespace: string; }; 'deployment-3': { clusters: string[]; namespace: string; }; }; clusterRefs: { 'cluster-1': string; 'cluster-2': string; }; }; export {};