Skip to content

DB + SNCB: remove E2E tests after endpoints permanently shut down#344

Merged
derhuerst merged 2 commits intopublic-transport:mainfrom
KristjanESPERANTO:tests
Dec 30, 2025
Merged

DB + SNCB: remove E2E tests after endpoints permanently shut down#344
derhuerst merged 2 commits intopublic-transport:mainfrom
KristjanESPERANTO:tests

Conversation

@KristjanESPERANTO
Copy link
Copy Markdown
Collaborator

@KristjanESPERANTO KristjanESPERANTO commented Dec 10, 2025

I would like to reduce the number of failed tests. As a start, I suggest first deactivate the tests for both profiles - DB and SNCB.

Currently, 201 E2E tests are failing. After this change, there will be 25 fewer. I would look at the rest step by step.

Since the endpoints will most likely not return, we could alternatively remove them completely.

related: #284 and #306

@traines-source
Copy link
Copy Markdown
Member

I haven't looked into it closely, but hafas.bene-systems.com (cf #41) could actually be a viable replacement for some of that.

@KristjanESPERANTO KristjanESPERANTO changed the title DB + SNBC: skip all E2E tests after endpoints permanently shut down DB + SNCB: skip all E2E tests after endpoints permanently shut down Dec 11, 2025
@KristjanESPERANTO
Copy link
Copy Markdown
Collaborator Author

KristjanESPERANTO commented Dec 11, 2025

Thanks for the hint! I looked into hafas.bene-system.com. The mgate.exe API exists but requires authentication:

curl -s -X POST "https://hafas.bene-system.com/bin/mgate.exe" \
  -H "Content-Type: application/json" \
  -d '{"ver":"1.52","lang":"eng","auth":{"type":"AID","aid":"test"},"client":{"type":"AND"},"svcReqL":[{"meth":"ServerInfo","req":{}}]}' | jq '.err, .errTxt'
# Output: "AUTH", "HCI Core: Authorization fail"

I think that until we resolve this, the SNCB tests should be disabled.

@derhuerst
Copy link
Copy Markdown
Member

Thanks for the hint! I looked into hafas.bene-system.com. The mgate.exe API exists but requires authentication:

Just FYI: There also is a query.exe-style endpoint, but the hafas-client support for it is still half-done, half-outdated.

test/e2e/db.js Outdated
@@ -1,3 +1,7 @@
// Note: All tests in this file are skipped because the DB HAFAS endpoint
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this file entirely. We can always obtain it from the Git history again if it turns out we need it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can always obtain it from the Git history again if it turns out we need it.

Okay, I removed both of them right away - the same applies to SNCB.

@traines-source
Copy link
Copy Markdown
Member

traines-source commented Dec 29, 2025

PTE seems to have support for it, which probably means that the key is baked into the Öffi app 👀

@KristjanESPERANTO
Copy link
Copy Markdown
Collaborator Author

PTE seems to have support for it, which probably means that the key is baked into the Öffi app 👀

They seem to use https://hafas.bene-system.com/bin/stboard.exe (which doesn't need authorization). Unfortunately, that doesn't help us at the moment 🙁

@derhuerst derhuerst changed the title DB + SNCB: skip all E2E tests after endpoints permanently shut down DB + SNCB: remove E2E tests after endpoints permanently shut down Dec 30, 2025
@derhuerst derhuerst merged commit d24d2e3 into public-transport:main Dec 30, 2025
13 of 14 checks passed
@KristjanESPERANTO KristjanESPERANTO deleted the tests branch January 9, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants