Skip to content

Commit

Permalink
test: Added integration test run for main branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Sep 20, 2024
1 parent b093065 commit 1265fe5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
additional-test-arguments: '--logger GitHubActions'
secrets:
nuget-key: ${{ secrets.NUGET_KEY }}
api-key: ${{ secrets.API_KEY }}

release:
name: Release
Expand Down
9 changes: 8 additions & 1 deletion src/tests/IntegrationTests/Tests.QuickstartData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public async Task QuickstartData()

CreateCatalogResponse createCatalogResponse = await client.Catalog.CreateCatalogAsync(
namespaceId: "havendv",
name: "shakespeare",
name: $"shakespeare_{Random.Shared.Next(1_000_000)}",
description: "Works of Shakespeare",
cancellationToken: cancellationToken);

Expand Down Expand Up @@ -88,5 +88,12 @@ FileProcessStatus2.FILEPROCESSSTATUSCOMPLETED or
Console.WriteLine($" SourceFile: {chunk.SourceFile}");
Console.WriteLine("----------------------------------------");
}

DeleteCatalogResponse deleteCatalogResponse = await client.Catalog.DeleteCatalogAsync(
namespaceId: "havendv",
catalogId: catalog?.CatalogId!,
cancellationToken: cancellationToken);

deleteCatalogResponse.Catalog?.Value1?.CatalogId.Should().Be(catalog?.CatalogId);
}
}
1 change: 1 addition & 0 deletions src/tests/IntegrationTests/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public partial class Tests
public InstillClient GetAuthenticatedClient()
{
var apiKey =
Environment.GetEnvironmentVariable("API_KEY") ??
Environment.GetEnvironmentVariable("INSTILL_API_TOKEN") ??
throw new AssertInconclusiveException("INSTILL_API_TOKEN environment variable is not found.");

Expand Down

0 comments on commit 1265fe5

Please sign in to comment.