Exemplo n.º 1
0
        private async Task And_a_single_service_account()
        {
            using var client             = LocalhostRestClient.Create();
            _serviceAccountCreateCommand = ServiceAccountCreateCommandFactory.CreateForIntegrationTest();

            await client.ServiceAccounts.CreateAsync(_serviceAccountCreateCommand);
        }
Exemplo n.º 2
0
        private async Task And_a_single_apiKey()
        {
            using var client = LocalhostRestClient.Create();

            _serviceAccountCreateCommand = ServiceAccountCreateCommandFactory.CreateForIntegrationTest();

            _serviceAccount = await client.ServiceAccounts.CreateAsync(_serviceAccountCreateCommand);

            _apiKeyCreate = new ApiKeyCreate()
            {
                ServiceAccountId = _serviceAccount.Id,
                Description      = "GetAllScenario"
            };

            _apiKey = await client.ApiKeys.CreateAsync(_apiKeyCreate);
        }
Exemplo n.º 3
0
        private async Task And_a_single_acl()
        {
            using var client             = LocalhostRestClient.Create();
            _serviceAccountCreateCommand = ServiceAccountCreateCommandFactory.CreateForIntegrationTest();

            _serviceAccount = await client.ServiceAccounts.CreateAsync(_serviceAccountCreateCommand);

            _aclCreateDelete = new AclCreateDelete
            {
                ServiceAccountId = Convert.ToInt64(_serviceAccount.Id),
                Allow            = true,
                Operation        = "WRITE",
                TopicPrefix      = "itsAThing"
            };

            await client.Acls.CreateAsync(_aclCreateDelete);
        }