feat(feeds): queue explicit FreshRSS state changes with uncertain-outcome recovery
Build and publish container images / images (push) Failing after 12m40s
Build and publish container images / images (push) Failing after 12m40s
This commit is contained in:
1 parent
16e572397b
commit
131a7ca01f
12 files changed
+973
-58
No files matched your search
@@ -543,7 +543,12 @@ func TestFeedsChromium(t *testing.T) {
|
||||
if e = s.store.CompleteFeed(context.Background(), claim, items, "", "", "", false); e != nil {
|
||||
t.Fatal(e)
|
||||
}
|
||||
fresh, e := s.store.SaveFeedSource(context.Background(), domain, actor, store.FeedSource{UUID: uuid.NewString(), Provider: "freshrss", Title: "FreshRSS fixture", URL: "https://example.org/api/greader.php", Enabled: true, Interval: 300})
|
||||
fresh := store.FeedSource{UUID: uuid.NewString(), Provider: "freshrss", Title: "FreshRSS fixture", URL: "https://example.org/api/greader.php", Enabled: true, Interval: 300}
|
||||
fresh.Credential, e = s.store.SealFeedCredential(domain, actor, fresh.UUID, "fixture", "synthetic")
|
||||
if e != nil {
|
||||
t.Fatal(e)
|
||||
}
|
||||
fresh, e = s.store.SaveFeedSource(context.Background(), domain, actor, fresh)
|
||||
if e != nil {
|
||||
t.Fatal(e)
|
||||
}
|
||||
@@ -577,6 +582,15 @@ func TestFeedsChromium(t *testing.T) {
|
||||
web := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
r.Host = "localhost"
|
||||
r.Header.Set("Authorization", "Bearer "+token)
|
||||
if r.URL.Path == "/fixture/run-feed-actions" && r.Method == "POST" {
|
||||
fake := &feedRemoteFake{id: "catalog-b"}
|
||||
if e := s.syncFeedActions(r.Context(), fake.client(t)); e != nil {
|
||||
http.Error(w, "test worker failed", 500)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(204)
|
||||
return
|
||||
}
|
||||
if r.URL.Path == "/fixture" {
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
fmt.Fprint(w, "<!doctype html><body style='margin:0'><script>"+string(script)+"</script></body>")
|
||||
@@ -586,6 +600,12 @@ func TestFeedsChromium(t *testing.T) {
|
||||
}))
|
||||
defer web.Close()
|
||||
for _, width := range []string{"1440", "390"} {
|
||||
if _, e = s.store.DB.Exec(`DELETE FROM feed_actions WHERE source_uuid=?`, fresh.UUID); e != nil {
|
||||
t.Fatal(e)
|
||||
}
|
||||
if _, e = s.store.DB.Exec(`UPDATE feed_items SET is_read=0 WHERE source_uuid=?`, fresh.UUID); e != nil {
|
||||
t.Fatal(e)
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second)
|
||||
args := []string{"internal/server/testdata/vim-browser-smoke.mjs", web.URL + "/fixture?width=" + url.QueryEscape(width), t.TempDir(), "/tmp/pageswiki-feeds-" + width + ".png", width, "850"}
|
||||
out, e := exec.CommandContext(ctx, "node", args...).CombinedOutput()
|
||||
|
||||
Reference in new issue
Block a user