Skip to content

Conversation

@joshtrichards
Copy link
Member

Summary

This PR adds the ability to run:

  • a specific category of setup checks
  • an individual check

Implementation:

  • Existing setup check category names are used for running checks in a specific category (e.g. network)
  • Existing class names are used for running individual checks
  • All checks still run otherwise by default so not a breaking change in behavior

Examples:

Run all checks in a specific category - e.g. the network related tests:

./occ setupchecks network

RESULT:

www-data@83e3407f887c:~/html$ ./occ setupchecks network
	network:
		✓ WebDAV endpoint: Your web server is properly set up to allow file synchronization over WebDAV.
		✓ Data directory protected
		✓ Internet connectivity
		✓ JavaScript source map support
		✓ JavaScript modules support
		✓ OCS provider resolving
		✓ .well-known URLs: Your server is correctly configured to serve `.well-known` URLs.
		✓ Font file loading
www-data@83e3407f887c:~/html$ 

Run a specific individual check - e.g. the InternetConnectivity test:

./occ setupcheck OCA\\Settings\\SetupChecks\\InternetConnectivity

RESULT:

www-data@83e3407f887c:~/html$ ./occ setupcheck OCA\\Settings\\SetupChecks\\InternetConnectivity
	network:
		✓ Internet connectivity
www-data@83e3407f887c:~/html$ 

If an unrecognized category / class is specified inform the user:

www-data@83e3407f887c:~/html$ ./occ setupchecks xxx    
Invalid type specified (or no results for that type)
www-data@83e3407f887c:~/html$ 

TODO

Checklist

@joshtrichards joshtrichards force-pushed the jtr-feat-setupchecks-limit-type branch from 63f03c8 to 6221951 Compare December 28, 2024 16:57
Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

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

👍

@blizzz blizzz mentioned this pull request Jan 8, 2025
This was referenced Jan 14, 2025
@Altahrim Altahrim mentioned this pull request Jan 21, 2025

protected function execute(InputInterface $input, OutputInterface $output): int {
$results = $this->setupCheckManager->runAll();
$limit = $input->getArgument('type');
Copy link
Contributor

Choose a reason for hiding this comment

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

Why call it limit?

Suggested change
$limit = $input->getArgument('type');
$type = $input->getArgument('type');

Comment on lines +55 to +59
if (substr_count($limit, '\\') > 1) {
$results = $this->setupCheckManager->runClass($limit);
} else {
$results = $this->setupCheckManager->runCategory($limit);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe introducing two distinct flags would make it more straightforward

@Altahrim Altahrim mentioned this pull request Jan 23, 2025
@blizzz blizzz mentioned this pull request Jan 29, 2025
1 task
@blizzz blizzz modified the milestones: Nextcloud 31, Nextcloud 32 Jan 29, 2025
This was referenced Aug 22, 2025
@nextcloud-bot nextcloud-bot mentioned this pull request Sep 2, 2025
This was referenced Sep 4, 2025
This was referenced Sep 25, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants