Rename _vagrant to vagrant

Apparently the idea to prefix a package with an underscore is not that
smart as I thought. Yes `go test` does not run it by default when you
run `go test ./...` but also other commands like `go mod tidy` do not
work consistently.

Nothing changes in practice. By default only unit tests run. Setting the
new environment variable: `TEST_WITH_VAGRANT` you include the test who
uses vagrant.

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
This commit is contained in:
Gianluca Arbezzano
2021-03-18 15:05:28 +01:00
parent dbf51c823e
commit c5dd65c724
5 changed files with 63 additions and 57 deletions

View File

@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"net/http"
"os"
"testing"
"time"
@ -16,6 +17,11 @@ import (
)
func TestVagrantSetupGuide(t *testing.T) {
_, ok := os.LookupEnv("TEST_WITH_VAGRANT")
if !ok {
t.Skip("You can run e2e tests that depends from Vagrant setting the envvar TEST_WITH_VAGRANT")
}
ctx := context.Background()
machine, err := vagrant.Up(ctx,