Skip to content

Commit 33751ed

Browse files
committed
tests(discovery): delete temporary collections before testing tokenization
1 parent 0e5da15 commit 33751ed

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/IBM.WatsonDeveloperCloud.Discovery.v1.IntegrationTests/DiscoveryIntegrationTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,20 @@ public void TestExpansions_Success()
726726
[TestMethod]
727727
public void TestTokenization_Success()
728728
{
729+
var collectionsList = ListCollections(_environmentId);
730+
731+
foreach (Collection collection in collectionsList.Collections)
732+
{
733+
if (!string.IsNullOrEmpty(collection.Description))
734+
{
735+
if (collection.Description.Contains("safe to delete"))
736+
{
737+
DeleteCollection(_environmentId, collection.CollectionId);
738+
Console.WriteLine("deleted " + collection.CollectionId);
739+
}
740+
}
741+
}
742+
729743
CreateCollectionRequest createCollectionRequest = new CreateCollectionRequest()
730744
{
731745
Language = CreateCollectionRequest.LanguageEnum.JA,

0 commit comments

Comments
 (0)