From 3b863a891251ed4f2faae5bb5ba6b4d6748a18f9 Mon Sep 17 00:00:00 2001
From: Benjamin Brahmer
Date: Thu, 19 Jan 2023 17:08:20 +0100
Subject: remove id part from pattern matching since website changes ID too
often
Signed-off-by: Benjamin Brahmer
---
tests/command/feeds.bats | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'tests')
diff --git a/tests/command/feeds.bats b/tests/command/feeds.bats
index 7598ac345..b308c70c8 100644
--- a/tests/command/feeds.bats
+++ b/tests/command/feeds.bats
@@ -47,7 +47,7 @@ teardown() {
assert_success
assert_output --partial '"faviconLink": "https:\/\/nextcloud.com\/wp-content\/uploads\/2022\/03\/favicon.png",'
- assert_output --partial '"faviconLink": "https:\/\/www.heise.de\/favicon.ico?v=JykvN0w9Ye",'
+ assert_output --partial '"faviconLink": "https:\/\/www.heise.de\/favicon.ico?v='
}
@test "[$TESTSUITE] List all items" {
--
cgit v1.2.3
From 69681d12cb3fb55762902192230edd87fd3215f9 Mon Sep 17 00:00:00 2001
From: Benjamin Brahmer
Date: Wed, 25 Jan 2023 15:23:44 +0100
Subject: Implement item search
The search result can only link to the feed.
Signed-off-by: Benjamin Brahmer
---
tests/Unit/Search/FeedSearchProviderTest.php | 2 +-
tests/Unit/Search/FolderSearchProviderTest.php | 2 +-
tests/Unit/Search/ItemSearchProviderTest.php | 147 +++++++++++++++++++++++++
3 files changed, 149 insertions(+), 2 deletions(-)
create mode 100644 tests/Unit/Search/ItemSearchProviderTest.php
(limited to 'tests')
diff --git a/tests/Unit/Search/FeedSearchProviderTest.php b/tests/Unit/Search/FeedSearchProviderTest.php
index 97ec1f984..e1463a7a7 100644
--- a/tests/Unit/Search/FeedSearchProviderTest.php
+++ b/tests/Unit/Search/FeedSearchProviderTest.php
@@ -110,7 +110,7 @@ class FeedSearchProviderTest extends TestCase
$this->generator->expects($this->once())
->method('imagePath')
- ->with('core', 'filetypes/text.svg')
+ ->with('core', 'rss.svg')
->willReturn('folderpath.svg');
$this->generator->expects($this->once())
diff --git a/tests/Unit/Search/FolderSearchProviderTest.php b/tests/Unit/Search/FolderSearchProviderTest.php
index cf4ffd969..e06bf45f7 100644
--- a/tests/Unit/Search/FolderSearchProviderTest.php
+++ b/tests/Unit/Search/FolderSearchProviderTest.php
@@ -77,7 +77,7 @@ class FolderSearchProviderTest extends TestCase
public function testGetOrderInternal()
{
- $this->assertSame(-1, $this->class->getOrder('news.page.index', []));
+ $this->assertSame(0, $this->class->getOrder('news.page.index', []));
}
public function testSearch()
diff --git a/tests/Unit/Search/ItemSearchProviderTest.php b/tests/Unit/Search/ItemSearchProviderTest.php
new file mode 100644
index 000000000..062d52a77
--- /dev/null
+++ b/tests/Unit/Search/ItemSearchProviderTest.php
@@ -0,0 +1,147 @@
+l10n = $this->getMockBuilder(IL10N::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->generator = $this->getMockBuilder(IURLGenerator::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->itemService = $this->getMockBuilder(ItemServiceV2::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->class = new ItemSearchProvider(
+ $this->l10n,
+ $this->generator,
+ $this->itemService
+ );
+ }
+
+ public function testGetId()
+ {
+ $this->assertSame('news_item', $this->class->getId());
+ }
+
+ public function testGetName()
+ {
+ $this->l10n->expects($this->once())
+ ->method('t')
+ ->with('News articles')
+ ->willReturnArgument(0);
+
+ $this->assertSame('News articles', $this->class->getName());
+ }
+
+ public function testGetOrderExternal()
+ {
+ $this->assertSame(65, $this->class->getOrder('contacts.Page.index', []));
+ }
+
+ public function testGetOrderInternal()
+ {
+ $this->assertSame(1, $this->class->getOrder('news.page.index', []));
+ }
+
+ public function testSearch()
+ {
+ $user = $this->getMockBuilder(IUser::class)
+ ->getMock();
+ $query = $this->getMockBuilder(ISearchQuery::class)
+ ->getMock();
+
+ $query->expects($this->once())
+ ->method('getCursor')
+ ->willReturn(null);
+
+ $query->expects($this->once())
+ ->method('getLimit')
+ ->willReturn(10);
+
+ $user->expects($this->once())
+ ->method('getUID')
+ ->willReturn('user');
+
+ $query->expects($this->once())
+ ->method('getTerm')
+ ->willReturn('some text');
+
+
+ $items = [
+ Item::fromRow(['id' => 1,'title' => 'some_tErm', 'body' => 'some text', 'feedId' => 1]),
+ Item::fromRow(['id' => 2,'title' => 'nothing', 'body' => 'some text', 'feedId' => 1])
+ ];
+
+ $this->itemService->expects($this->once())
+ ->method('findAllWithFilters')
+ ->with(
+ 'user',
+ ListType::ALL_ITEMS,
+ 10,
+ 0,
+ false,
+ ['some text'])
+ ->willReturn($items);
+
+
+ $this->l10n->expects($this->once())
+ ->method('t')
+ ->with('News')
+ ->willReturnArgument(0);
+
+ $this->generator->expects($this->once())
+ ->method('imagePath')
+ ->with('core', 'filetypes/text.svg')
+ ->willReturn('folderpath.svg');
+
+ $this->generator->expects($this->exactly(2))
+ ->method('linkToRoute')
+ ->with('news.page.index')
+ ->willReturn('/news');
+
+
+ $result = $this->class->search($user, $query)->jsonSerialize();
+ $entry = $result['entries'][0]->jsonSerialize();
+ $this->assertSame('News', $result['name']);
+ $this->assertSame('some_tErm', $entry['title']);
+ $this->assertSame('folderpath.svg', $entry['thumbnailUrl']);
+ $this->assertSame('some text', $entry['subline']);
+ $this->assertSame('/news#/items/feeds/1', $entry['resourceUrl']);
+ }
+}
--
cgit v1.2.3
From ea8002e2d9a4ea82d01987741aefcae275379ad9 Mon Sep 17 00:00:00 2001
From: Benjamin Brahmer
Date: Sun, 5 Mar 2023 12:02:38 +0100
Subject: add cron status badge to admin setting
Display a info card in the settings, indicating when the last news update job ran.
Signed-off-by: Benjamin Brahmer
---
tests/Unit/Service/StatusServiceTest.php | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
(limited to 'tests')
diff --git a/tests/Unit/Service/StatusServiceTest.php b/tests/Unit/Service/StatusServiceTest.php
index dfe3dfd55..fdfe41af5 100644
--- a/tests/Unit/Service/StatusServiceTest.php
+++ b/tests/Unit/Service/StatusServiceTest.php
@@ -16,6 +16,7 @@ namespace OCA\News\Tests\Unit\Service;
use OCA\News\Service\StatusService;
use OCP\IConfig;
use OCP\IDBConnection;
+use OCP\BackgroundJob\IJobList;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -37,6 +38,12 @@ class StatusServiceTest extends TestCase
*/
private $service;
+ /**
+ * @var IJobList
+ */
+ private $jobList;
+
+
public function setUp(): void
{
$this->settings = $this->getMockBuilder(IConfig::class)
@@ -45,7 +52,10 @@ class StatusServiceTest extends TestCase
$this->connection = $this->getMockBuilder(IDBConnection::class)
->disableOriginalConstructor()
->getMock();
- $this->service = new StatusService($this->settings, $this->connection);
+ $this->jobList = $this->getMockBuilder(IJobList::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->service = new StatusService($this->settings, $this->connection, $this->jobList);
}
public function testGetStatus()
--
cgit v1.2.3
From b1476e958a02eca59c1ce9b5cd3bf09aea6cd308 Mon Sep 17 00:00:00 2001
From: Benjamin Brahmer
Date: Wed, 1 Mar 2023 17:41:11 +0100
Subject: If timestamp is null use timestamp "one year ago"
if timestamp is not set during creation of a feed use date one year ago
code fixes and linting fixes.
Co-authored-by: Sean Molenaar
Signed-off-by: Benjamin Brahmer
---
tests/Unit/Fetcher/FeedFetcherTest.php | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
(limited to 'tests')
diff --git a/tests/Unit/Fetcher/FeedFetcherTest.php b/tests/Unit/Fetcher/FeedFetcherTest.php
index af8066171..1814a8271 100644
--- a/tests/Unit/Fetcher/FeedFetcherTest.php
+++ b/tests/Unit/Fetcher/FeedFetcherTest.php
@@ -326,7 +326,7 @@ class FeedFetcherTest extends TestCase
$item = $this->createItem();
$feed = $this->createFeed();
$this->mockIterator($this->feed_mock, [$this->item_mock]);
- $result = $this->fetcher->fetch($this->url, false, null, null);
+ $result = $this->fetcher->fetch($this->url, false, null, null, null);
$this->assertEquals([$feed, [$item]], $result);
}
@@ -344,7 +344,8 @@ class FeedFetcherTest extends TestCase
$this->url,
false,
'account@email.com',
- 'F9sEU*Rt%:KFK8HMHT&'
+ 'F9sEU*Rt%:KFK8HMHT&',
+ $this->modified->format(DateTime::RSS)
);
$this->assertEquals([$feed, [$item]], $result);
@@ -359,7 +360,7 @@ class FeedFetcherTest extends TestCase
$item = $this->createItem('audio/ogg');
$feed = $this->createFeed();
$this->mockIterator($this->feed_mock, [$this->item_mock]);
- $result = $this->fetcher->fetch($this->url, false, null, null);
+ $result = $this->fetcher->fetch($this->url, false, null, null, null);
$this->assertEquals([$feed, [$item]], $result);
}
@@ -373,7 +374,7 @@ class FeedFetcherTest extends TestCase
$item = $this->createItem('video/ogg');
$feed = $this->createFeed();
$this->mockIterator($this->feed_mock, [$this->item_mock]);
- $result = $this->fetcher->fetch($this->url, false, null, null);
+ $result = $this->fetcher->fetch($this->url, false, null, null, null);
$this->assertEquals([$feed, [$item]], $result);
}
@@ -388,7 +389,7 @@ class FeedFetcherTest extends TestCase
$feed = $this->createFeed('de-DE');
$item = $this->createItem();
$this->mockIterator($this->feed_mock, [$this->item_mock]);
- $result = $this->fetcher->fetch($this->url, false, null, null);
+ $result = $this->fetcher->fetch($this->url, false, null, null, null);
$this->assertEquals([$feed, [$item]], $result);
}
@@ -402,7 +403,7 @@ class FeedFetcherTest extends TestCase
$this->createFeed('he-IL');
$this->createItem();
$this->mockIterator($this->feed_mock, [$this->item_mock]);
- list($_, $items) = $this->fetcher->fetch($this->url, false, null, null);
+ list($_, $items) = $this->fetcher->fetch($this->url, false, null, null, null);
$this->assertTrue($items[0]->getRtl());
}
@@ -428,7 +429,7 @@ class FeedFetcherTest extends TestCase
$this->mockIterator($this->feed_mock, [$this->item_mock]);
- list($feed, $items) = $this->fetcher->fetch($this->url, false, null, null);
+ list($feed, $items) = $this->fetcher->fetch($this->url, false, null, null, null);
$this->assertSame($items[0]->getPubDate(), 1522180229);
}
@@ -454,7 +455,7 @@ class FeedFetcherTest extends TestCase
$this->mockIterator($this->feed_mock, [$this->item_mock]);
- list($feed, $items) = $this->fetcher->fetch($this->url, false, null, null);
+ list($feed, $items) = $this->fetcher->fetch($this->url, false, null, null, null);
$this->assertSame($items[0]->getPubDate(), 1519761029);
}
@@ -467,7 +468,7 @@ class FeedFetcherTest extends TestCase
$this->createItem();
$feed = $this->createFeed();
$this->mockIterator($this->feed_mock, [$this->item_mock]);
- $result = $this->fetcher->fetch($this->url, false, null, null);
+ $result = $this->fetcher->fetch($this->url, false, null, null. null, null);
//Explicitly assert GUID value
$this->assertEquals(2, count($result));
$this->assertEquals(1, count($result[1]));
@@ -485,7 +486,7 @@ class FeedFetcherTest extends TestCase
$this->createItem();
$feed = $this->createFeed();
$this->mockIterator($this->feed_mock, [$this->item_mock]);
- $result = $this->fetcher->fetch($this->url, false, null, null);
+ $result = $this->fetcher->fetch($this->url, false, null, null, null);
//Explicitly assert GUID value
$this->assertEquals(2, count($result));
$this->assertEquals(1, count($result[1]));
--
cgit v1.2.3
From 84c2ba538c3cc199720d24c0bf680bf496b46826 Mon Sep 17 00:00:00 2001
From: Benjamin Brahmer
Date: Mon, 24 Oct 2022 17:16:08 +0200
Subject: Create tests for the updating and purging functions via the API
Signed-off-by: Benjamin Brahmer
---
tests/test_helper/bats-assert | 2 +-
tests/test_helper/php-feed-generator | 1 +
tests/updater/helpers/settings.bash | 8 ++
tests/updater/update.bats | 251 +++++++++++++++++++++++++++++++++++
4 files changed, 261 insertions(+), 1 deletion(-)
create mode 160000 tests/test_helper/php-feed-generator
create mode 100644 tests/updater/helpers/settings.bash
create mode 100644 tests/updater/update.bats
(limited to 'tests')
diff --git a/tests/test_helper/bats-assert b/tests/test_helper/bats-assert
index ffe84ea5d..78fa631d1 160000
--- a/tests/test_helper/bats-assert
+++ b/tests/test_helper/bats-assert
@@ -1 +1 @@
-Subproject commit ffe84ea5dd43b568851549b3e241db150c12929c
+Subproject commit 78fa631d1370562d2cd4a1390989e706158e7bf0
diff --git a/tests/test_helper/php-feed-generator b/tests/test_helper/php-feed-generator
new file mode 160000
index 000000000..7cc160481
--- /dev/null
+++ b/tests/test_helper/php-feed-generator
@@ -0,0 +1 @@
+Subproject commit 7cc16048103bf31e9a4b54293e8bbc6049a874c1
diff --git a/tests/updater/helpers/settings.bash b/tests/updater/helpers/settings.bash
new file mode 100644
index 000000000..460cdfa17
--- /dev/null
+++ b/tests/updater/helpers/settings.bash
@@ -0,0 +1,8 @@
+export user=admin
+export NC_FEED="http://localhost:8090/Nextcloud.rss"
+export HEISE_FEED="http://localhost:8090/heise.xml"
+export BASE_URLv1="http://localhost:8080/index.php/apps/news/api/v1-2"
+export NC_HOST="http://localhost:8080"
+export TEST_FEED="http://localhost:8090/test.xml"
+export FEED1="http://localhost:8090/feed1.xml"
+export FEED2="http://localhost:8090/feed2.xml"
\ No newline at end of file
diff --git a/tests/updater/update.bats b/tests/updater/update.bats
new file mode 100644
index 000000000..9db1ec4bf
--- /dev/null
+++ b/tests/updater/update.bats
@@ -0,0 +1,251 @@
+#!/usr/bin/env bats
+
+setup_file(){
+ load "helpers/settings"
+
+ if test -f "tests/api/helpers/settings-override.bash"; then
+ load "helpers/settings-override"
+ fi
+
+ export APP_PASSWORD=$(NC_PASS=${user} ./occ user:add-app-password ${user} --password-from-env | grep -Po '([A-Z|a-z|0-9]{72})')
+}
+
+teardown_file(){
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} DELETE ${NC_HOST}/ocs/v2.php/core/apppassword OCS-APIRequest:true
+}
+
+setup() {
+ load "../test_helper/bats-support/load"
+ load "../test_helper/bats-assert/load"
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 10 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml
+}
+
+TESTSUITE="Update"
+
+#
+# This testsuite is not intended to test the api but rather the update and purge functions.
+#
+
+teardown() {
+ # delete all feeds
+ FEED_IDS=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+ for i in $FEED_IDS; do
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} DELETE ${BASE_URLv1}/feeds/$i > /dev/null
+ done
+
+ # delete all folders
+ FOLDER_IDS=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/folders | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+ for i in $FOLDER_IDS; do
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} DELETE ${BASE_URLv1}/folders/$i > /dev/null
+ done
+}
+
+@test "[$TESTSUITE] Test simple update" {
+ # Create Feed
+ FEEDID=$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} POST ${BASE_URLv1}/feeds url=$TEST_FEED | grep -Po '"id":\K([0-9]+)')
+ # Get Items
+ ID_LIST1=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+ # Trigger Update
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds/update userId=${user} feedId=$FEEDID
+ # Get Items again
+ ID_LIST2=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ assert_equal "${ID_LIST1[*]}" "${ID_LIST2[*]}"
+}
+
+@test "[$TESTSUITE] Test simple update with new content" {
+ # Create Feed
+ FEEDID=$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} POST ${BASE_URLv1}/feeds url=$TEST_FEED | grep -Po '"id":\K([0-9]+)')
+ # Get Items
+ ID_LIST1=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 15 -s 9 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml
+
+ # Trigger Update
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds/update userId=${user} feedId=$FEEDID
+ # Get Items again
+ ID_LIST2=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ output="${ID_LIST2[*]}"
+
+ # Check that they are not equal but that they match partially.
+ assert_not_equal "${ID_LIST1[*]}" "${ID_LIST2[*]}"
+ assert_output --partial "${ID_LIST1[*]}"
+}
+
+@test "[$TESTSUITE] Test purge with small feed" {
+ # Generate Feed with 210 items.
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 50 -s 0 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml
+ # Create Feed
+ FEEDID=$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} POST ${BASE_URLv1}/feeds url=$TEST_FEED | grep -Po '"id":\K([0-9]+)')
+
+ # Trigger Update
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 50 -s 50 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds/update userId=${user} feedId=$FEEDID
+
+ # Trigger Update
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 50 -s 100 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds/update userId=${user} feedId=$FEEDID
+
+ # Trigger Update
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 50 -s 150 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds/update userId=${user} feedId=$FEEDID
+
+ # Trigger Update
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 50 -s 200 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds/update userId=${user} feedId=$FEEDID
+
+ # Get Items
+ ID_LIST=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ # get biggest item ID
+ max=${ID_LIST[0]}
+ for n in "${ID_LIST[@]}" ; do
+ ((n > max)) && max=$n
+ done
+
+ # mark all items of feed as read, returns nothing
+ STATUS_CODE=$(http --ignore-stdin -hdo /tmp/body -a ${user}:${APP_PASSWORD} PUT ${BASE_URLv1}/feeds/$FEEDID/read newestItemId="$max" 2>&1| grep -Po '(?<=HTTP\/1\.1 )[0-9]{3}(?= OK)')
+
+ # cleanup, purge items
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/cleanup/after-update
+
+ # Get unread Items, should be empty
+ output="$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items getRead=false | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')"
+
+ # Get all items, also read items
+ ID_LIST2=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ assert_equal $STATUS_CODE 200
+ # check if amount is as expected
+ assert_equal "${#ID_LIST2[@]}" 200
+
+ # unread items should be empty
+ assert_output ""
+}
+
+@test "[$TESTSUITE] Test purge with more items than default limit 200" {
+ # Generate Feed with 210 items.
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 210 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml
+ # Create Feed
+ FEEDID=$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} POST ${BASE_URLv1}/feeds url=$TEST_FEED | grep -Po '"id":\K([0-9]+)')
+ # Get Items
+ ID_LIST=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ # get biggest item ID
+ max=${ID_LIST[0]}
+ for n in "${ID_LIST[@]}" ; do
+ ((n > max)) && max=$n
+ done
+
+ # mark all items of feed as read, returns nothing
+ STATUS_CODE=$(http --ignore-stdin -hdo /tmp/body -a ${user}:${APP_PASSWORD} PUT ${BASE_URLv1}/feeds/$FEEDID/read newestItemId="$max" 2>&1| grep -Po '(?<=HTTP\/1\.1 )[0-9]{3}(?= OK)')
+
+ # cleanup, purge items
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/cleanup/after-update
+
+ # Get unread Items, should be empty
+ output="$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items getRead=false | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')"
+
+ # Get all items, also read items
+ ID_LIST2=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ assert_equal $STATUS_CODE 200
+ # check if amount is as expected
+ assert_equal "${#ID_LIST2[@]}" 210
+ assert_output ""
+}
+
+@test "[$TESTSUITE] Test Update and pruge with feed item>200; items<200" {
+ # Generate Feed with 210 items.
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 210 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml
+ # Create Feed
+ FEEDID=$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} POST ${BASE_URLv1}/feeds url=$TEST_FEED | grep -Po '"id":\K([0-9]+)')
+ # Get Items
+ ID_LIST=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ # get biggest item ID
+ max=${ID_LIST[0]}
+ for n in "${ID_LIST[@]}" ; do
+ ((n > max)) && max=$n
+ done
+
+ # mark all items of feed as read, returns nothing
+ STATUS_CODE=$(http --ignore-stdin -hdo /tmp/body -a ${user}:${APP_PASSWORD} PUT ${BASE_URLv1}/feeds/$FEEDID/read newestItemId="$max" 2>&1| grep -Po '(?<=HTTP\/1\.1 )[0-9]{3}(?= OK)')
+ # cleanup, purge items
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/cleanup/after-update
+
+ FIRST_UPDATE="$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items getRead=false | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')"
+
+ assert_equal "${FIRST_UPDATE}" ""
+
+ # Generate feed "update" items id 190 + 40 items = id 230
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 40 -s 190 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds/update userId=${user} feedId=$FEEDID
+
+ # Get Items
+ ID_LIST=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ # get biggest item ID
+ max=${ID_LIST[0]}
+ for n in "${ID_LIST[@]}" ; do
+ ((n > max)) && max=$n
+ done
+
+ # mark all items of feed as read, returns nothing
+ STATUS_CODE=$(http --ignore-stdin -hdo /tmp/body -a ${user}:${APP_PASSWORD} PUT ${BASE_URLv1}/feeds/$FEEDID/read newestItemId="$max" 2>&1| grep -Po '(?<=HTTP\/1\.1 )[0-9]{3}(?= OK)')
+
+ SECOND_UPDATE="$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items getRead=false | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')"
+
+ assert_equal "${SECOND_UPDATE}" ""
+
+ # cleanup, purge items
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/cleanup/after-update
+
+ # Get all items, also read items
+ READ_ITEMS=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ # stays at the 210 limit https://github.com/nextcloud/news/blob/ec74c1b5f3712594c7ea2139c8dfdff15d1ef826/lib/Service/FeedServiceV2.php#L287
+ assert_equal "${#READ_ITEMS[@]}" 210
+}
+
+@test "[$TESTSUITE] Test purge with two feeds with different item count limit" {
+ # Generate Feed with 260 items.
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 260 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/feed1.xml
+ # Generate Feed with 210 items.
+ php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 210 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/feed2.xml
+
+ # Create Feeds
+ FEED1ID=$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} POST ${BASE_URLv1}/feeds url=$FEED1 | grep -Po '"id":\K([0-9]+)')
+ FEED2ID=$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} POST ${BASE_URLv1}/feeds url=$FEED2 | grep -Po '"id":\K([0-9]+)')
+ # Get Items
+ ID_LIST=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+ # get biggest item ID, it is enough to do this one time
+ max=${ID_LIST[0]}
+ for n in "${ID_LIST[@]}" ; do
+ ((n > max)) && max=$n
+ done
+
+ # mark all items of both feeds as read, returns nothing
+ STATUS_CODE1=$(http --ignore-stdin -hdo /tmp/body -a ${user}:${APP_PASSWORD} PUT ${BASE_URLv1}/feeds/$FEED1ID/read newestItemId="$max" 2>&1| grep -Po '(?<=HTTP\/1\.1 )[0-9]{3}(?= OK)')
+ STATUS_CODE2=$(http --ignore-stdin -hdo /tmp/body -a ${user}:${APP_PASSWORD} PUT ${BASE_URLv1}/feeds/$FEED2ID/read newestItemId="$max" 2>&1| grep -Po '(?<=HTTP\/1\.1 )[0-9]{3}(?= OK)')
+
+ # cleanup, purge items
+ http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/cleanup/after-update
+
+ # Get unread Items, should be empty
+ output="$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items getRead=false | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')"
+
+ # Get all items of Feed Nr. 1 and 2, including read items
+ ID_LIST_FEED1=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items id="$FEED1ID" type=0 | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+ ID_LIST_FEED2=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items id="$FEED2ID" type=0 | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
+
+
+ assert_equal $STATUS_CODE1 200
+ assert_equal $STATUS_CODE2 200
+ # check if amount is as expected
+ assert_equal "${#ID_LIST_FEED1[@]}" 260
+ assert_equal "${#ID_LIST_FEED2[@]}" 210
+ assert_output ""
+}
\ No newline at end of file
--
cgit v1.2.3
From a70d155ce4684e922b1609e7df30d128b7205dc5 Mon Sep 17 00:00:00 2001
From: Benjamin Brahmer
Date: Mon, 3 Apr 2023 15:27:21 +0200
Subject: Set lastmodified in read all
if this is not updated the API won't work correctly and we get sync errors.
Adjust test to use item api
Signed-off-by: Benjamin Brahmer
---
tests/Unit/Db/ItemMapperTest.php | 10 +++++-----
tests/api/items.bats | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
(limited to 'tests')
diff --git a/tests/Unit/Db/ItemMapperTest.php b/tests/Unit/Db/ItemMapperTest.php
index 3a4a026d6..80421bc0a 100644
--- a/tests/Unit/Db/ItemMapperTest.php
+++ b/tests/Unit/Db/ItemMapperTest.php
@@ -528,7 +528,7 @@ class ItemMapperTest extends MapperTestUtility
->with('SQL QUERY')
->willReturn($result);
- $this->builder->expects($this->once())
+ $this->builder->expects($this->exactly(2))
->method('createParameter')
->will($this->returnArgument(0));
@@ -537,9 +537,9 @@ class ItemMapperTest extends MapperTestUtility
->with('news_items')
->will($this->returnSelf());
- $this->builder->expects($this->once())
+ $this->builder->expects($this->exactly(2))
->method('set')
- ->with('unread', 'unread')
+ ->withConsecutive(['unread', 'unread'], ['last_modified', 'last_modified'])
->will($this->returnSelf());
$this->builder->expects($this->exactly(1))
@@ -547,9 +547,9 @@ class ItemMapperTest extends MapperTestUtility
->withConsecutive(['id IN (:idList)'])
->will($this->returnSelf());
- $this->builder->expects($this->exactly(2))
+ $this->builder->expects($this->exactly(3))
->method('setParameter')
- ->withConsecutive(['idList', [1, 2]], ['unread', false])
+ ->withConsecutive(['idList', [1, 2]], ['unread', false], ['last_modified'])
->will($this->returnSelf());
$this->builder->expects($this->exactly(1))
diff --git a/tests/api/items.bats b/tests/api/items.bats
index d6896785f..4bb38bf75 100644
--- a/tests/api/items.bats
+++ b/tests/api/items.bats
@@ -67,7 +67,7 @@ teardown() {
SYNC_TIME=$(date +%s)
# mark all items of feed as read, returns nothing (other client marks items as read)
- STATUS_CODE=$(http --ignore-stdin -hdo /tmp/body -a ${user}:${APP_PASSWORD} PUT ${BASE_URLv1}/feeds/$FEEDID/read newestItemId="$max" 2>&1| grep HTTP/)
+ STATUS_CODE=$(http --ignore-stdin -hdo /tmp/body -a ${user}:${APP_PASSWORD} PUT ${BASE_URLv1}/items/read newestItemId="$max" 2>&1| grep HTTP/)
# client 2 checks for updates since last sync
UPDATED_ITEMS=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items/updated id=$FEEDID lastModified=$SYNC_TIME | grep -Po '"id":\K([0-9]+)' | tr '\n' ' '))
--
cgit v1.2.3
From 4d6d602c4e0d2cdc444a8adc8bc5d47c68b65bdc Mon Sep 17 00:00:00 2001
From: Benjamin Brahmer
Date: Sat, 15 Apr 2023 18:37:44 +0200
Subject: Change dates to far future and leave comment
Signed-off-by: Benjamin Brahmer
---
tests/command/feeds.bats | 1 +
tests/test_helper/feeds/no_guid_feed.xml | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 11 deletions(-)
(limited to 'tests')
diff --git a/tests/command/feeds.bats b/tests/command/feeds.bats
index b308c70c8..683207d98 100644
--- a/tests/command/feeds.bats
+++ b/tests/command/feeds.bats
@@ -24,6 +24,7 @@ teardown() {
@test "[$TESTSUITE] Add feed without GUIDs" {
run ./occ news:feed:add "$user" "$NO_GUID_FEED" --title "Something-${BATS_SUITE_TEST_NUMBER}"
+ echo "Attention! Are the dates of the feed older than 'one year ago'? If so this is not a bug, adjust the dates. #2201"
assert_failure
assert_output "Malformed feed: item has no GUID"
diff --git a/tests/test_helper/feeds/no_guid_feed.xml b/tests/test_helper/feeds/no_guid_feed.xml
index e27a1b07b..068abb5ca 100644
--- a/tests/test_helper/feeds/no_guid_feed.xml
+++ b/tests/test_helper/feeds/no_guid_feed.xml
@@ -11,66 +11,66 @@
2016 JoshuaWrightSlack Wyrm 911 - Feeling better
- Wed, 13 Apr 2022 09:07:01 +0100
+ Wed, 13 Apr 2099 09:07:01 +0100
https://joshuawright.net/slack-wyrm-911.html
Slack Wyrm 910 - Cake trip
- Mon, 11 Apr 2022 08:52:54 +0100
+ Mon, 11 Apr 2099 08:52:54 +0100
https://joshuawright.net/slack-wyrm-910.html
Slack Wyrm 909 - Cake time
- Fri, 8 Apr 2022 09:29:32 +0100
+ Fri, 8 Apr 2099 09:29:32 +0100Slack Wyrm 908 - Dragons Lair
- Wed, 6 Apr 2022 09:00:13 +0100
+ Wed, 6 Apr 2099 09:00:13 +0100
https://joshuawright.net/slack-wyrm-908.html
Slack Wyrm 907 - Ten feet tall
- Mon, 4 Apr 2022 15:12:51 +0100
+ Mon, 4 Apr 2099 15:12:51 +0100
https://joshuawright.net/slack-wyrm-907.html
Slack Wyrm 906 - True self
- Fri, 1 Apr 2022 09:28:06 +1100
+ Fri, 1 Apr 2099 09:28:06 +1100
https://joshuawright.net/slack-wyrm-906.html
Slack Wyrm 905 - Drink up
- Wed, 30 Mar 2022 11:07:49 +1100
+ Wed, 30 Mar 2099 11:07:49 +1100
https://joshuawright.net/slack-wyrm-905.html
Slack Wyrm 904 - Marvellous medicine
- Mon, 28 Mar 2022 09:02:44 +1100
+ Mon, 28 Mar 2099 09:02:44 +1100
https://joshuawright.net/slack-wyrm-904.html
Slack Wyrm 903 - Golden still
- Fri, 25 Mar 2022 09:48:06 +1100
+ Fri, 25 Mar 2099 09:48:06 +1100
https://joshuawright.net/slack-wyrm-903.html
Slack Wyrm 902 - Janet the genius
- Wed, 23 Mar 2022 09:30:47 +1100
+ Wed, 23 Mar 2099 09:30:47 +1100
https://joshuawright.net/slack-wyrm-902.html
Slack Wyrm 901 - Bye bye Bucky
- Mon, 21 Mar 2022 09:01:36 +1100
+ Mon, 21 Mar 2099 09:01:36 +1100
https://joshuawright.net/slack-wyrm-901.html
--
cgit v1.2.3
From ee4097e8b80322544d5f4705e478100d3a0a461d Mon Sep 17 00:00:00 2001
From: Benjamin Brahmer
Date: Sat, 15 Apr 2023 18:48:26 +0200
Subject: Also adjust dates on other test feeds
Signed-off-by: Benjamin Brahmer
---
tests/test_helper/feeds/Nextcloud.rss | 22 +-
tests/test_helper/feeds/heise.xml | 602 +++++++++++++++++-----------------
2 files changed, 312 insertions(+), 312 deletions(-)
(limited to 'tests')
diff --git a/tests/test_helper/feeds/Nextcloud.rss b/tests/test_helper/feeds/Nextcloud.rss
index 0e031ef83..a46def8bd 100644
--- a/tests/test_helper/feeds/Nextcloud.rss
+++ b/tests/test_helper/feeds/Nextcloud.rss
@@ -12,7 +12,7 @@
https://nextcloud.com/
- Tue, 16 Aug 2022 10:17:13 +0000
+ Tue, 16 Aug 2099 10:17:13 +0000en-US
hourly
@@ -32,7 +32,7 @@
https://nextcloud.com/blog/how-to-get-started-with-nextcloud-repeat/
- Tue, 16 Aug 2022 09:44:01 +0000
+ Tue, 16 Aug 2099 09:44:01 +0000
@@ -116,7 +116,7 @@
https://nextcloud.com/blog/openproject-and-nextcloud-integrate-project-management-and-file-management/
- Mon, 15 Aug 2022 12:44:53 +0000
+ Mon, 15 Aug 2099 12:44:53 +0000
@@ -160,7 +160,7 @@
https://nextcloud.com/blog/5-more-things-to-keep-your-data-safe/
- Wed, 10 Aug 2022 09:06:12 +0000
+ Wed, 10 Aug 2099 09:06:12 +0000
@@ -360,7 +360,7 @@
https://nextcloud.com/blog/digital-sovereignty-security-collabora-online-nextcloud/
- Thu, 04 Aug 2022 13:07:21 +0000
+ Thu, 04 Aug 2099 13:07:21 +0000
@@ -444,7 +444,7 @@
https://nextcloud.com/blog/nextcloud-keeps-growth-up-with-75-more-revenue-and-10x-userbase/
- Thu, 04 Aug 2022 09:40:29 +0000
+ Thu, 04 Aug 2099 09:40:29 +0000
@@ -506,7 +506,7 @@
https://nextcloud.com/blog/baden-wurttemberg-procurement-chamber-decides-us-cloud-services-are-not-gdpr-compliant/
- Mon, 01 Aug 2022 09:00:00 +0000
+ Mon, 01 Aug 2099 09:00:00 +0000
@@ -553,7 +553,7 @@
https://nextcloud.com/blog/interview-shadow-and-a-world-where-5-companies-own-all-data/
- Mon, 01 Aug 2022 07:43:56 +0000
+ Mon, 01 Aug 2099 07:43:56 +0000
@@ -579,7 +579,7 @@
https://nextcloud.com/blog/all-app-developers-put-your-hands-up-best-nextcloud-app-contest-2/
- Thu, 28 Jul 2022 09:00:00 +0000
+ Thu, 28 Jul 2099 09:00:00 +0000
@@ -715,7 +715,7 @@
https://nextcloud.com/blog/5-unique-security-features-by-nextcloud/
- Wed, 27 Jul 2022 14:36:15 +0000
+ Wed, 27 Jul 2099 14:36:15 +0000
@@ -879,7 +879,7 @@
https://nextcloud.com/blog/nextcloud-in-the-wall-street-journal-microsoft-and-cookies/#comments
- Wed, 27 Jul 2022 09:12:45 +0000
+ Wed, 27 Jul 2099 09:12:45 +0000
diff --git a/tests/test_helper/feeds/heise.xml b/tests/test_helper/feeds/heise.xml
index f0ff9e2f7..fb9f90787 100644
--- a/tests/test_helper/feeds/heise.xml
+++ b/tests/test_helper/feeds/heise.xml
@@ -1,7 +1,7 @@
heise online NewsNachrichten nicht nur aus der Welt der Computer
- 2022-08-19T15:36:00+02:00
+ 2099-08-19T15:36:00+02:00https://www.heise.de/rss/heise-atom.xmlheise onlinehttps://www.heise.de
@@ -14,8 +14,8 @@
RISC-V-Prozessor aus China: LeapFive NB2 verspricht Raspi-Rechenleistunghttp://heise.de/-7237368
- 2022-08-19T15:36:00+02:00
- 2022-08-19T15:36:00+02:00
+ 2099-08-19T15:36:00+02:00
+ 2099-08-19T15:36:00+02:00Die chinesische Firma Yuefang Technology stellt einen 12-Nanometer-Chip mit vier RISC-V-Kernen, GPU, KI-Beschleuniger und DDR4-Controller vor.
Die chinesische Firma Yuefang Technology stellt einen 12-Nanometer-Chip mit vier RISC-V-Kernen, GPU, KI-Beschleuniger und DDR4-Controller vor.
]]>
@@ -24,8 +24,8 @@
Besetzung des IGF: UN ringt um Stand zwischen den Fronten der Netzpolitikhttp://heise.de/-7237105
- 2022-08-19T15:30:00+02:00
- 2022-08-19T15:30:00+02:00
+ 2099-08-19T15:30:00+02:00
+ 2099-08-19T15:30:00+02:00Während die USA und China eigene Initiativen zur Internet Governance starten, will António Guterres die Vereinten Nationen als multilaterale Plattform stärken.
Während die USA und China eigene Initiativen zur Internet Governance starten, will António Guterres die Vereinten Nationen als multilaterale Plattform stärken.
]]>
@@ -34,8 +34,8 @@
Sicherheitsupdates: Angreifer könnten PCs mit IBM-Software attackierenhttp://heise.de/-7236808
- 2022-08-19T14:46:00+02:00
- 2022-08-19T14:46:00+02:00
+ 2099-08-19T14:46:00+02:00
+ 2099-08-19T14:46:00+02:00Mehrere Schwachstellen machen unter anderem IBM InfoSphere Identity Insight verwundbar.
Mehrere Schwachstellen machen unter anderem IBM InfoSphere Identity Insight verwundbar.
]]>
@@ -44,8 +44,8 @@
Cyber-Angriff auf französische Tochter von Rüstungsunternehmen Hensoldthttp://heise.de/-7237071
- 2022-08-19T14:32:00+02:00
- 2022-08-19T14:32:00+02:00
+ 2099-08-19T14:32:00+02:00
+ 2099-08-19T14:32:00+02:00Das Rüstungsunternehmen Hensoldt meldet, dass die französische Tochter Nexeya Ziel eines "ernsthaften Cyberangriffs" wurde. Der Betrieb sei eingeschränkt.
Das Rüstungsunternehmen Hensoldt meldet, dass die französische Tochter Nexeya Ziel eines "ernsthaften Cyberangriffs" wurde. Der Betrieb sei eingeschränkt.
]]>
@@ -54,8 +54,8 @@
Youtube führt Wasserzeichen in heruntergeladenen Shorts einhttp://heise.de/-7236987
- 2022-08-19T13:58:00+02:00
- 2022-08-19T13:58:00+02:00
+ 2099-08-19T13:58:00+02:00
+ 2099-08-19T13:58:00+02:00Google markiert Shorts: Bei Youtube erstellte Kurzvideos werden mit einem Wasserzeichen gekennzeichnet, sobald man sie herunterlädt.
Google markiert Shorts: Bei Youtube erstellte Kurzvideos werden mit einem Wasserzeichen gekennzeichnet, sobald man sie herunterlädt.
]]>
@@ -64,8 +64,8 @@
Artemis-1: NASA plant Website zur Nachverfolgung der Mondmission in Echtzeithttp://heise.de/-7236962
- 2022-08-19T13:38:00+02:00
- 2022-08-19T13:38:00+02:00
+ 2099-08-19T13:38:00+02:00
+ 2099-08-19T13:38:00+02:00In wenigen Tagen will die NASA die Raumkapsel Orion zum Mond schießen. Die Mission können Interessierte dann live online verfolgen – basierend auf echten Daten.
In wenigen Tagen will die NASA die Raumkapsel Orion zum Mond schießen. Die Mission können Interessierte dann live online verfolgen – basierend auf echten Daten.
]]>
@@ -74,8 +74,8 @@
MIT Technology Review Podcast: Die Auswirkungen vom Ende des Biospritshttp://heise.de/-7237047
- 2022-08-19T13:30:00+02:00
- 2022-08-19T13:30:00+02:00
+ 2099-08-19T13:30:00+02:00
+ 2099-08-19T13:30:00+02:00Biokraftstoffe sind dem Ende geweiht. Die Anbauflächen sollen für Nahrung genutzt werden. Doch das bringt neue Probleme mit sich, erläutert Horst Fehrenbach.
Biokraftstoffe sind dem Ende geweiht. Die Anbauflächen sollen für Nahrung genutzt werden. Doch das bringt neue Probleme mit sich, erläutert Horst Fehrenbach.
]]>
@@ -84,8 +84,8 @@
High-End-CPU für Server: Qualcomm setzt auf Nuvia-Kernehttp://heise.de/-7236952
- 2022-08-19T13:22:00+02:00
- 2022-08-19T13:22:00+02:00
+ 2099-08-19T13:22:00+02:00
+ 2099-08-19T13:22:00+02:00Qualcomm soll bereits einen ARM-Prozessor für Server entworfen haben. Darin stecken CPU-Kerne der übernommenen Firma Nuvia.
Qualcomm soll bereits einen ARM-Prozessor für Server entworfen haben. Darin stecken CPU-Kerne der übernommenen Firma Nuvia.
]]>
@@ -94,8 +94,8 @@
China greift US-Chips-Act an und warnt vor den Folgen http://heise.de/-7236956
- 2022-08-19T13:18:00+02:00
- 2022-08-19T13:18:00+02:00
+ 2099-08-19T13:18:00+02:00
+ 2099-08-19T13:18:00+02:00Der US-Chips-Act der USA verstößt laut China gegen die Fair-Trade-Prinzipien der WTO und sei diskriminierend. Das US-Gesetz bringe zusätzlich mehr Unsicherheit.
Der US-Chips-Act der USA verstößt laut China gegen die Fair-Trade-Prinzipien der WTO und sei diskriminierend. Das US-Gesetz bringe zusätzlich mehr Unsicherheit.
]]>
@@ -104,8 +104,8 @@
Ubuntu: Offizielle Unterstützung für RISC-Vhttp://heise.de/-7236668
- 2022-08-19T12:58:00+02:00
- 2022-08-19T12:58:00+02:00
+ 2099-08-19T12:58:00+02:00
+ 2099-08-19T12:58:00+02:00Von Ubuntu 22.04.01 stellt Canonical offiziell Abbilder mit RISC-V-Unterstützung bereit. Die Distribution ist etwa an StarFives VisionFive-Board angepasst.
Von Ubuntu 22.04.01 stellt Canonical offiziell Abbilder mit RISC-V-Unterstützung bereit. Die Distribution ist etwa an StarFives VisionFive-Board angepasst.
]]>
@@ -114,8 +114,8 @@
Update der Suchmaschine: Google will weniger Clickbaithttp://heise.de/-7236672
- 2022-08-19T12:07:00+02:00
- 2022-08-19T12:07:00+02:00
+ 2099-08-19T12:07:00+02:00
+ 2099-08-19T12:07:00+02:00Statt SEO: Von Menschen für Menschen. Unter diesem Slogan vertreibt Google sein "hilfreiche Inhalte Update" für die Suchmaschine.
Statt SEO: Von Menschen für Menschen. Unter diesem Slogan vertreibt Google sein "hilfreiche Inhalte Update" für die Suchmaschine.
]]>
@@ -124,8 +124,8 @@
Data Science: Cloudera startet All-in-one-Datendienst in der Cloudhttp://heise.de/-7236825
- 2022-08-19T12:03:00+02:00
- 2022-08-19T12:03:00+02:00
+ 2099-08-19T12:03:00+02:00
+ 2099-08-19T12:03:00+02:00Die Cloudera Data Platform One bündelt alle für Datenanalyse und -erkundung erforderlichen Tools als Software-as-a-Service auf Basis der Lakehouse-Architektur.
Die Cloudera Data Platform One bündelt alle für Datenanalyse und -erkundung erforderlichen Tools als Software-as-a-Service auf Basis der Lakehouse-Architektur.
]]>
@@ -134,8 +134,8 @@
Google-Kritikerin Whittaker: "KI ist eine Technik der Mächtigen"http://heise.de/-7231268
- 2022-08-19T12:00:00+02:00
- 2022-08-19T12:00:00+02:00
+ 2099-08-19T12:00:00+02:00
+ 2099-08-19T12:00:00+02:00Meredith Whittaker, Mitbegründerin des AI Now Institute und eine der schärfsten Kritikerinnen von Google im Interview mit MIT Technology Review.
Meredith Whittaker, Mitbegründerin des AI Now Institute und eine der schärfsten Kritikerinnen von Google im Interview mit MIT Technology Review.
]]>
@@ -144,8 +144,8 @@
heise-Angebot: Nur für kurze Zeit: 50 Prozent Rabatt auf alle Videokurse der heise Academy http://heise.de/-7221998
- 2022-08-19T12:00:00+02:00
- 2022-08-19T12:00:00+02:00
+ 2099-08-19T12:00:00+02:00
+ 2099-08-19T12:00:00+02:00Wer sich zu wichtigen IT-Themen weiterbilden möchte, kann für kurze Zeit beim Kauf der Videokurse in der heise Academy ordentlich sparen.
Wer sich zu wichtigen IT-Themen weiterbilden möchte, kann für kurze Zeit beim Kauf der Videokurse in der heise Academy ordentlich sparen.
]]>
@@ -154,8 +154,8 @@
Fachkräftemangel: Worauf es Arbeitnehmern beim Jobwechsel ankommthttp://heise.de/-7236742
- 2022-08-19T11:59:00+02:00
- 2022-08-19T11:59:00+02:00
+ 2099-08-19T11:59:00+02:00
+ 2099-08-19T11:59:00+02:00Die Jobvermittler von Remote haben verglichen, welche Vorteile Arbeitskräfte im internationalen Vergleich von Unternehmen erwarten. Flexibilität hat Priorität.
Die Jobvermittler von Remote haben verglichen, welche Vorteile Arbeitskräfte im internationalen Vergleich von Unternehmen erwarten. Flexibilität hat Priorität.
]]>
@@ -164,8 +164,8 @@
Softwareentwickler verbringen ein Drittel ihrer Arbeitszeit in Meetingshttp://heise.de/-7236712
- 2022-08-19T11:57:00+02:00
- 2022-08-19T11:57:00+02:00
+ 2099-08-19T11:57:00+02:00
+ 2099-08-19T11:57:00+02:00Eine neue Studie untersucht, wie viel Zeit Entwickler in Meetings verbringen, wie sich das in ihrer Produktivität niederschlägt und wie sie gegenwirken können.
Eine neue Studie untersucht, wie viel Zeit Entwickler in Meetings verbringen, wie sich das in ihrer Produktivität niederschlägt und wie sie gegenwirken können.
]]>
@@ -174,8 +174,8 @@
Programmiersprache Julia 1.8 gibt tieferen Einblick in die Performancehttp://heise.de/-7235662
- 2022-08-19T11:45:00+02:00
- 2022-08-19T11:45:00+02:00
+ 2099-08-19T11:45:00+02:00
+ 2099-08-19T11:45:00+02:00Neben einem neuen Profiler und einem Tool zum Auswerten der Ladezeiten erweitert das Release das Inlining. Die Anbindung an Apple Silicon gilt zudem als stabil.
Neben einem neuen Profiler und einem Tool zum Auswerten der Ladezeiten erweitert das Release das Inlining. Die Anbindung an Apple Silicon gilt zudem als stabil.
]]>
@@ -184,8 +184,8 @@
Für den Mac: Beschleunigte Varianten des Apple M2 im Anmarschhttp://heise.de/-7236734
- 2022-08-19T11:35:00+02:00
- 2022-08-19T11:35:00+02:00
+ 2099-08-19T11:35:00+02:00
+ 2099-08-19T11:35:00+02:00