Skip to content
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

test: ensuring the embedded UI works #433

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

helio-frota
Copy link
Collaborator

@helio-frota helio-frota commented Jun 18, 2024

I'm running PM-mode just to have access to DB.
And then running devmode with no auth and a different port and doing the basic requests

Copy link
Contributor

@bobmcwhirter bobmcwhirter left a comment

Choose a reason for hiding this comment

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

This is awesome! Maybe make a test Context to make testing against a running instance in the future easier also?

@helio-frota
Copy link
Collaborator Author

thanks!

Maybe make a test Context to make testing against a running instance in the future easier also?

no idea if that is easy but sounds like a great idea 👍

@helio-frota
Copy link
Collaborator Author

pm-mode-only will be a bit easier than running 2 instances...(thinking on testContext)

the second trustd is running after (not in parallel with) pm-mode to avoid this error constraint "pg_type_typname_nsp_index" https://stackoverflow.com/questions/54351783/duplicate-key-value-violates-unique-constraint-postgres-error-when-trying-to-c

@helio-frota helio-frota added this pull request to the merge queue Jun 18, 2024
Merged via the queue into trustification:main with commit 9babf65 Jun 18, 2024
2 checks passed
@helio-frota helio-frota deleted the test-emb-ui branch June 18, 2024 22:51
.expect("Failed to start trustd devmode.");

// Wait for availability
let seconds = time::Duration::from_secs(15);
Copy link
Contributor

Choose a reason for hiding this comment

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

Re-reviewing... can we replace this arbitrary sleep() with watching stdio or something to truck along as soon as the service is up?

Alternatively, instead of forking and executing, can we run main() or similar directly from within the test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good, thanks I'll try 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants