Skip to content

Commit 3ee86ad

Browse files
committed
test(discovery): delete temporary collections before running tokenization tests
1 parent 33751ed commit 3ee86ad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,8 @@ public void TestExpansions_Success()
711711
var createExpansionsResult = CreateExpansions(_environmentId, expansionCollectionId, body);
712712
var listExpansionsResult = ListExpansions(_environmentId, expansionCollectionId);
713713
var deleteExpansionResult = DeleteExpansions(_environmentId, expansionCollectionId);
714-
714+
DeleteCollection(_environmentId, expansionCollectionId);
715+
715716
Assert.IsNotNull(deleteExpansionResult);
716717
Assert.IsNotNull(listExpansionsResult);
717718
Assert.IsTrue(listExpansionsResult._Expansions[0].ExpandedTerms[0] == "expanded-term");
@@ -732,7 +733,7 @@ public void TestTokenization_Success()
732733
{
733734
if (!string.IsNullOrEmpty(collection.Description))
734735
{
735-
if (collection.Description.Contains("safe to delete"))
736+
if (collection.Description.Contains("safe to delete") || collection.Description.Contains("Please delete me"))
736737
{
737738
DeleteCollection(_environmentId, collection.CollectionId);
738739
Console.WriteLine("deleted " + collection.CollectionId);
@@ -787,6 +788,8 @@ public void TestTokenization_Success()
787788
{
788789
Console.WriteLine(e.Message);
789790
}
791+
792+
DeleteCollection(_environmentId, tokenizationCollectionId);
790793
}
791794
#endregion
792795

0 commit comments

Comments
 (0)