Exemple #1
0
        public async Task SetUp()
        {
            _config        = new VaultConfig();
            _config.Host   = "localhost:8082";
            _config.Scheme = "http";
            _config.Path   = "api/v1";
            _config.Token  = $"bearer  {TestContext.Parameters["token"]}";
            var vaultSealingForTestsHelper = new VaultSealingForTestsHelper(_config);
            await vaultSealingForTestsHelper.Unseal();

            _vaultService = new VaultService(
                _config,
                new TestLogManager(LogLevel.Trace)
                );

            provide.Model.Vault.Vault vault = new provide.Model.Vault.Vault();
            vault.Name        = "Name";
            vault.Description = "Description";

            // Create a single Vault instance
            provide.Model.Vault.Vault response = await _vaultService.CreateVault(vault);

            response.Id.Should().NotBeNull();

            _vaultId = response.Id !.Value;
            _wallet  = new VaultWallet(_vaultService, _vaultId.ToString(), LimboLogs.Instance);
        }
        public async Task SetUp()
        {
            _config        = new VaultConfig();
            _config.Host   = "localhost:8082";
            _config.Scheme = "http";
            _config.Path   = "api/v1";
            _config.Token  = $"bearer  {TestContext.Parameters["token"]}";
            var vaultSealingForTestsHelper = new VaultSealingForTestsHelper(_config);
            await vaultSealingForTestsHelper.Unseal();

            _vaultService = new VaultService(_config, LimboLogs.Instance);
        }