-
Notifications
You must be signed in to change notification settings - Fork 14
e2e: add kds-pcs-downtime test #1999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| defer setCancel() | ||
| err = ct.RunSet(setCtx) | ||
| t.Logf("Set error: %v", err) | ||
| require.Error(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be more specific about the error we're expecting here (same for TDX).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is just a context deadline exceeded error, it is not very meaningful, but I think checking both for context deadline exceeded and if the connection was proxied as suggested below, this should be good.
aa8a1ed to
20334cd
Compare
20334cd to
ced2f23
Compare
This E2E test tests the different scenarios for when the KDS/PCS is unavailable, documented in the dev-docs. We can block the KDS/PCS connection from the CLI by setting up an HTTPS proxy and blocking specific domains. To simulate unavailability on the issuer side (i.e., Coordinator), we override the
/etc/hostsfile with, e.g.,127.0.0.1 kdsintf.amd.com. Simulating PCS unavailability for the issuer side is not possible, since all the interaction with the PCS/PCCS happens on the host side, not in the Go code. So for TDX, we only test PCS unavailability on the CLI side.All the tests currently only test CLI <-> Coordinator connections. In the future, we may also want to test Coordinator <-> Initializer connections, where the Coordinator acts as the client.
SNP run: https://github.com/edgelesssys/contrast/actions/runs/19864351537/job/56922742153
TDX run: https://github.com/edgelesssys/contrast/actions/runs/19864358538/job/56922766667