Add fixtures for software and vulnerabilities end-to-end tests (#6337)
This commit is contained in:
@@ -251,12 +251,29 @@ e2e-setup:
|
||||
./build/fleetctl user create --context e2e --email=observer@example.com --name observer --password=password123# --global-role=observer
|
||||
./build/fleetctl user create --context e2e --email=sso_user@example.com --name "SSO user" --sso=true
|
||||
|
||||
# Setup e2e test environment and pre-populate database with software and vulnerabilities fixtures.
|
||||
#
|
||||
# Use in lieu of `e2e-setup` for tests that depend on these fixtures
|
||||
e2e-setup-with-software:
|
||||
curl 'https://localhost:8642/api/v1/setup' \
|
||||
--data-raw '{"server_url":"https://localhost:8642","org_info":{"org_name":"Fleet Test"},"admin":{"admin":true,"email":"admin@example.com","name":"Admin","password":"password123#","password_confirmation":"password123#"}}' \
|
||||
--compressed \
|
||||
--insecure
|
||||
./tools/backup_db/restore_e2e_software_test.sh
|
||||
|
||||
e2e-serve-free: e2e-reset-db
|
||||
./build/fleet serve --mysql_address=localhost:3307 --mysql_username=root --mysql_password=toor --mysql_database=e2e --server_address=0.0.0.0:8642
|
||||
|
||||
e2e-serve-premium: e2e-reset-db
|
||||
./build/fleet serve --dev_license --mysql_address=localhost:3307 --mysql_username=root --mysql_password=toor --mysql_database=e2e --server_address=0.0.0.0:8642
|
||||
|
||||
# Associate a host with a Fleet Desktop token.
|
||||
#
|
||||
# Usage:
|
||||
# make e2e-set-desktop-token host_id=1 token=foo
|
||||
e2e-set-desktop-token:
|
||||
docker-compose exec -T mysql_test bash -c 'echo "INSERT INTO e2e.host_device_auth (host_id, token) VALUES ($(host_id), \"$(token)\") ON DUPLICATE KEY UPDATE token=VALUES(token)" | MYSQL_PWD=toor mysql -uroot'
|
||||
|
||||
changelog:
|
||||
sh -c "find changes -type f | grep -v .keep | xargs -I {} sh -c 'grep \"\S\" {}; echo' > new-CHANGELOG.md"
|
||||
sh -c "cat new-CHANGELOG.md CHANGELOG.md > tmp-CHANGELOG.md && rm new-CHANGELOG.md && mv tmp-CHANGELOG.md CHANGELOG.md"
|
||||
|
||||
Reference in New Issue
Block a user