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

Create testing.md #172

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions docs/en-US/troubleshooting/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
category: 5. Troubleshooting
order: 3
title: Testing
description: How To Test VVV
permalink: /docs/en-US/troubleshooting/testing/
---

## Main VVV Repo

To test changes to the main repo, we need to check that it doesn't break an existing VM, and that it doesn't stop new VVV installs from working.

### Checking An Existing VM

Take an existing VVV install, and switch to the branch that has the changes, then reprovision. GitHub will have CLI instructions for how to checkout the branch with the new changes near the merge button.

Once the folder has the changes, run `vagrant halt && vagrant up --provision`.

## Utilities

You can test a new utility by adding it to `config/config.yml` ([example file](https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/config/default-config.yml)) and reprovisioning.

To test changes to the core provisioner, delete the `provision/utilities/core` folder, then change the `config/config.yml` file to match the repo and branch you'd like to test:

```yaml
utility-sources:
core:
repo: URL of repo to test
branch: name of branch to test
```

Then, halt the VM and reprovision: `vagrant halt && vagrant up --provision`
tomjn marked this conversation as resolved.
Show resolved Hide resolved

## Dashboard

```yaml
Copy link
Member

Choose a reason for hiding this comment

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

Also as the previous comment

Copy link
Member

Choose a reason for hiding this comment

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

I don't have any dashboard example but is missing this and a review to approve it.

```

## Custom Site Template

```yaml
tomjn marked this conversation as resolved.
Show resolved Hide resolved
wordpress-two:
skip_provisioning: false
description: "A standard WP install, useful for building plugins, testing things, etc"
repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
custom:
# locale: it_IT
delete_default_plugins: true
install_plugins:
- query-monitor
hosts:
- two.wordpress.test
```

If the pull request adds new parameters, check that they work as expected, and check that things still work if the parameter is missing/blank.

## Custom Site Template Develop

```yaml
wordpress-trunk:
skip_provisioning: true # provisioning this one takes longer, so it's disabled by default
description: "An svn based WP Core trunk dev setup, useful for contributor days, Trac tickets, patches"
repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template-develop.git
hosts:
- trunk.wordpress.test
```
Mte90 marked this conversation as resolved.
Show resolved Hide resolved

This template generate a log of different logs to simplify the debugging and the output in console, for a better testing is better to check the log in `VVV/log/provisioners/<datetime>/provisioner-site-wordpress-trunk.log` and the other files generated.