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

Vcpkg sample #3670

Merged
merged 14 commits into from
May 27, 2022
4 changes: 2 additions & 2 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ parameters:
default: sdk/*/*/*cov_xml.xml
- name: TimeoutInMinutes
type: number
default: 60
default: 120
- name: DependsOn
type: string
default: ''
Expand All @@ -41,7 +41,7 @@ jobs:
- job: ValidateLive
dependsOn: ${{ parameters.DependsOn }}
condition: ne(${{ parameters.Matrix }}, '{}')

timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
pool:
name: $(Pool)
vmImage: $(OSVmImage)
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ parameters:
default: 'sdk/*/*/*cov_xml.xml'
- name: LiveTestTimeoutInMinutes
type: number
default: 90
default: 120
- name: LineCoverageTarget
type: number
default: 95
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/stages/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ parameters:
default: sdk/*/*/*cov_xml.xml
- name: TimeoutInMinutes
type: number
default: 60
default: 120
- name: Location
type: string
default: ''
Expand Down
17 changes: 11 additions & 6 deletions samples/integration/vcpkg-all-smoke/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "get_env.hpp"
#include <azure/attestation.hpp>
#include <azure/core.hpp>
#include <azure/core/internal/json/json.hpp>
#include <azure/identity.hpp>
#include <azure/keyvault/certificates.hpp>
#include <azure/keyvault/keys.hpp>
Expand All @@ -35,6 +36,8 @@ int main()
const std::string clientSecret = "secret";
const std::string leaseID = "leaseID";
const std::string smokeUrl = "https://blob.com";
const std::string attestationUrl = "https://sharedwus.wus.attest.azure.net";

auto credential
= std::make_shared<Azure::Identity::ClientSecretCredential>(tenantId, clientId, clientSecret);

Expand All @@ -43,9 +46,9 @@ int main()
{
std::cout << "Creating Keyvault Clients" << std::endl;
// keyvault
KeyClient keyClient(std::getenv("AZURE_KEYVAULT_URL"), credential);
SecretClient secretClient(std::getenv("AZURE_KEYVAULT_URL"), credential);
CertificateClient certificateClient(std::getenv("AZURE_KEYVAULT_URL"), credential);
KeyClient keyClient(smokeUrl, credential);
SecretClient secretClient(smokeUrl, credential);
CertificateClient certificateClient(smokeUrl, credential);

std::cout << "Creating Storage Clients" << std::endl;
// Storage
Expand All @@ -69,10 +72,12 @@ int main()

// Attestation
std::cout << "Creating Attestation Clients" << std::endl;
std::unique_ptr<AttestationClient> attestationClient(
AttestationClientFactory::Create(std::getenv("ATTESTATION_AAD_URL")));

std::unique_ptr<AttestationAdministrationClient> attestationAdminClient(
AttestationAdministrationClientFactory::Create(std::getenv("ATTESTATION_AAD_URL"), credential));
AttestationAdministrationClientFactory::Create(attestationUrl, credential));

std::unique_ptr<AttestationClient> attestationClient(
AttestationClientFactory::Create(attestationUrl));

std::cout << "Successfully Created the Clients" << std::endl;
}
Expand Down