ssh_apt
- Components
- Code examples
SSH Apt Package Management Integration Testing
--- can update the server apt package database
SELECT * FROM apt_update('<prefix>');
--- can list all available packages
SELECT * FROM package;
--- can list installed packages
SELECT * FROM package WHERE installed = TRUE;
--- has apache2 available to install
SELECT * FROM package WHERE package = 'apache2';
--- can install a package
UPDATE package SET installed = TRUE WHERE package = 'apache2' AND
id = (
SELECT min(id) FROM package WHERE package = 'apache2'
);
--- confirms the package is installed
SELECT * FROM package WHERE package = 'apache2' AND installed = TRUE;
--- can uninstall the package
UPDATE package SET installed = FALSE
WHERE package = 'apache2' AND installed = TRUE;
--- confirms the package is uninstalled
SELECT * FROM package WHERE package = 'apache2' AND installed = FALSE;