public async Task ScopedApiKeysCanOnlyPushAndUnlistWithCorrectScopes() { // Arrange var packageCreationHelper = new PackageCreationHelper(TestOutputHelper); var commandlineHelper = new CommandlineHelper(TestOutputHelper); // Try to upload package using 'unlist' API key await _clientSdkHelper.FailToUploadPackage(GalleryConfiguration.Instance.Account.ApiKeyUnlist); // Try to upload package using 'push version' API key await _clientSdkHelper.FailToUploadPackage(GalleryConfiguration.Instance.Account.ApiKeyPushVersion); // Upload package using 'push' API key await _clientSdkHelper.UploadPackage(GalleryConfiguration.Instance.Account.ApiKeyPush); // Try to upload new version of package using 'unlist' API key await _clientSdkHelper.FailToUploadPackageVersion(GalleryConfiguration.Instance.Account.ApiKeyUnlist); // Upload new version of package using 'push version' API key await _clientSdkHelper.UploadPackageVersion(GalleryConfiguration.Instance.Account.ApiKeyPushVersion); // Try unlisting package version1 using 'push' API key await _clientSdkHelper.FailToUnlistPackage(GalleryConfiguration.Instance.Account.ApiKeyPush); // Try unlisting package version2 using 'push version' API key await _clientSdkHelper.FailToUnlistPackage(GalleryConfiguration.Instance.Account.ApiKeyPushVersion); // Unlist a package using 'unlist' API key await _clientSdkHelper.UnlistPackage(GalleryConfiguration.Instance.Account.ApiKeyUnlist); }