Skip to content

Commit

Permalink
fix another unit test due to nimbus server upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert Cheng committed Feb 26, 2013
1 parent 19ef20c commit 4f692bb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import com.microsoft.windowsazure.services.media.models.Locator;
import com.microsoft.windowsazure.services.media.models.LocatorInfo;
import com.microsoft.windowsazure.services.media.models.LocatorType;
import com.microsoft.windowsazure.services.media.models.ProtectionKey;
import com.microsoft.windowsazure.services.media.models.Task;
import com.microsoft.windowsazure.services.media.models.Task.CreateBatchOperation;

Expand Down Expand Up @@ -291,9 +292,12 @@ public void linkAssetContentKeySuccess() throws ServiceException, URISyntaxExcep
String originalTestName = testAssetPrefix + "linkAssetContentKeySuccess";
AssetInfo assetInfo = service.create(Asset.create().setName(originalTestName)
.setOptions(AssetOption.StorageEncrypted));

String protectionKeyId = service.action(ProtectionKey.getProtectionKeyId(ContentKeyType.StorageEncryption));
String contentKeyId = String.format("nb:kid:UUID:%s", UUID.randomUUID());
String encryptedContentKey = "dummyEncryptedContentKey";
service.create(ContentKey.create(contentKeyId, ContentKeyType.StorageEncryption, encryptedContentKey));
service.create(ContentKey.create(contentKeyId, ContentKeyType.StorageEncryption, encryptedContentKey)
.setProtectionKeyId(protectionKeyId));

// Act
service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId));
Expand Down

0 comments on commit 4f692bb

Please sign in to comment.