From e27c6bf86a571e0703f1d2c8b840a4f00b4ed4bf Mon Sep 17 00:00:00 2001 From: Farshid Tavakolizadeh Date: Mon, 29 Jan 2024 10:57:12 +0200 Subject: [PATCH] Refactor test utils and suites (#8) * Move utils package to top * Move Chip Tool tests to https://github.com/canonical/chip-tool-snap * Remove obsolete code and doc * Update unit testing triggers --- .github/workflows/config-provider-testing.yml | 38 ----- .github/workflows/snap-testing.yml | 117 -------------- .github/workflows/unit-testing.yml | 9 +- .github/workflows/versioning.yml | 16 -- .gitignore | 2 - README.md | 89 +--------- build/action.yml | 42 ----- go.mod | 4 +- go.sum | 7 - test/action.yml | 87 ---------- test/print-errors.sh | 11 -- test/suites/chip-tool/.gitattributes | 1 - ...ip-all-clusters-minimal-app-commit-1536ca2 | 3 - test/suites/chip-tool/main_test.go | 152 ------------------ {test/utils => utils}/config.go | 0 {test/utils => utils}/env.go | 0 {test/utils => utils}/exec.go | 0 {test/utils => utils}/exec_test.go | 0 {test/utils => utils}/net.go | 0 {test/utils => utils}/packaging.go | 0 {test/utils => utils}/refresh.go | 0 {test/utils => utils}/setup.go | 0 {test/utils => utils}/snap.go | 0 23 files changed, 11 insertions(+), 567 deletions(-) delete mode 100644 .github/workflows/config-provider-testing.yml delete mode 100644 .github/workflows/snap-testing.yml delete mode 100644 .github/workflows/versioning.yml delete mode 100644 .gitignore delete mode 100644 build/action.yml delete mode 100644 test/action.yml delete mode 100755 test/print-errors.sh delete mode 100644 test/suites/chip-tool/.gitattributes delete mode 100755 test/suites/chip-tool/chip-all-clusters-minimal-app-commit-1536ca2 delete mode 100644 test/suites/chip-tool/main_test.go rename {test/utils => utils}/config.go (100%) rename {test/utils => utils}/env.go (100%) rename {test/utils => utils}/exec.go (100%) rename {test/utils => utils}/exec_test.go (100%) rename {test/utils => utils}/net.go (100%) rename {test/utils => utils}/packaging.go (100%) rename {test/utils => utils}/refresh.go (100%) rename {test/utils => utils}/setup.go (100%) rename {test/utils => utils}/snap.go (100%) diff --git a/.github/workflows/config-provider-testing.yml b/.github/workflows/config-provider-testing.yml deleted file mode 100644 index 7bf5d76..0000000 --- a/.github/workflows/config-provider-testing.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Config Provider Testing - -on: - pull_request: - branches: [ main ] - paths-ignore: - - '**.md' - schedule: - - cron: "0 3 * * SUN" - # allow manual trigger - workflow_dispatch: - - -jobs: - build_and_test: - name: Build & Test - runs-on: ubuntu-latest - steps: - - name: Checkout the local actions - uses: actions/checkout@v3 - - - name: Build snap - uses: ./build - id: build - with: - repo: canonical/edgex-config-provider - branch: snap-testing - - - name: Checkout the local actions again - uses: actions/checkout@v3 - - - name: Test snap - uses: ./test - with: - name: edgex-config-provider - snap: ${{ steps.build.outputs.snap }} - platform_channel: latest/edge - diff --git a/.github/workflows/snap-testing.yml b/.github/workflows/snap-testing.yml deleted file mode 100644 index e7467a8..0000000 --- a/.github/workflows/snap-testing.yml +++ /dev/null @@ -1,117 +0,0 @@ -# This workflow performs local snap testing on listed snaps -name: Snap Testing - -on: - pull_request: - branches: [ main ] - paths-ignore: - - '**.md' - schedule: - # weekly tests run 6AM every Sunday - - cron: "0 3 * * SUN" - # allow manual trigger - workflow_dispatch: - inputs: - localBuild: - description: Build snaps from source (ignore channels) - required: false - default: false - type: boolean - channel: - description: Channel - required: false - default: "latest/edge" - type: choice - options: - - 'latest/edge' - - 'latest/beta' - - 'latest/candidate' - - 'latest/stable' - platform_channel: - description: Platform channel - required: false - default: "latest/edge" - type: choice - options: - - 'latest/edge' - - 'latest/beta' - - 'latest/candidate' - - 'latest/stable' - -jobs: - build_and_test: - name: Build & Test - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - name: device-mqtt - repo: edgexfoundry/device-mqtt-go - - - name: ekuiper - repo: canonical/edgex-ekuiper-snap - - - name: app-service-configurable - repo: edgexfoundry/app-service-configurable - - - name: device-gpio - repo: edgexfoundry/device-gpio - - - name: device-rest - repo: edgexfoundry/device-rest-go - - - name: device-snmp - repo: edgexfoundry/device-snmp-go - - - name: device-modbus - repo: edgexfoundry/device-modbus-go - - - name: edgexfoundry - repo: edgexfoundry/edgex-go - - - name: ui - repo: edgexfoundry/edgex-ui-go - - - name: device-rfid-llrp - repo: edgexfoundry/device-rfid-llrp-go - - - name: app-rfid-llrp-inventory - repo: edgexfoundry/app-rfid-llrp-inventory - - - name: device-virtual - repo: edgexfoundry/device-virtual-go - - - name: device-usb-camera - repo: edgexfoundry/device-usb-camera - - - name: device-onvif-camera - repo: edgexfoundry/device-onvif-camera - - - name: edgex-no-sec - repo: edgexfoundry/edgex-go - - # use local action to test - steps: - - name: Checkout the local actions - uses: actions/checkout@v3 - - - name: Build snap - if: ${{ inputs.localBuild }} - uses: ./build - id: build - with: - repo: ${{matrix.repo}} - - - name: Checkout the local actions again - uses: actions/checkout@v3 - - - name: Test snap - uses: ./test - with: - name: ${{matrix.name}} - snap: ${{ inputs.localBuild == true && steps.build.outputs.snap || '' }} - channel: ${{ github.event.inputs.channel }} - platform_channel: ${{ github.event.inputs.platform_channel }} - full_config_test: true - diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index 25370ad..10ec802 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -1,11 +1,12 @@ -# This workflow performs unit testing on utility packages +# This workflow performs unit testing on the utility package name: Unit Testing on: pull_request: - branches: [ main ] paths: - - 'test/utils/**' + - 'utils/**' + - '.github/unit-testing.yml' + - 'go.*' # manual trigger workflow_dispatch: @@ -20,4 +21,4 @@ jobs: with: go-version: 1.* - - run: go test ./test/utils -count=100 \ No newline at end of file + - run: go test ./utils -count=100 diff --git a/.github/workflows/versioning.yml b/.github/workflows/versioning.yml deleted file mode 100644 index a168e94..0000000 --- a/.github/workflows/versioning.yml +++ /dev/null @@ -1,16 +0,0 @@ -# This workflow is to move the vN tag to the latest commit with -# compatible semantic versioning. -# This is to allow consumer workflows to follow the latest releases in a major. -name: Move Major Tag - -on: - release: - types: [published, edited] - -jobs: - actions-tagger: - runs-on: windows-latest - steps: - - uses: Actions-R-Us/actions-tagger@v2.0.3 - with: - publish_latest_tag: false diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b0b03d4..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.log -tmp diff --git a/README.md b/README.md index 2e40f5b..5406a28 100644 --- a/README.md +++ b/README.md @@ -1,89 +1,8 @@ -# Matter Snap Tests (WIP) -Test scripts, Github actions, and workflows for the [Matter](https://github.com/project-chip/connectedhomeip/tree/master) snaps. +# Matter Snap Testing -The following diagram shows the Snap Testing workflow for building and testing snaps from upstream source code: -```mermaid ---- -title: Snap Testing Workflow ---- -flowchart LR - subgraph build [Build Job] - builda[[Build Action]] --> Source - --> Build[Build Snap] - --> Snap[/Artifact
Snap/] - end - subgraph test [Test Job] - Snap -.-> testa[[Test Action]] - --> gotests[Go Test Suites] - --> Logs[/Artifact
Logs/] - end -``` - -The Github Workflow configurations (triggers, jobs, etc) are maintained in respective upstream source codes. -The Github Actions and testing suites are maintained in this repository. - -## Test locally -This section includes example command to run tests. - -Useful `go test` flags are: -- `-v` is to enable verbose output -- `-failfast` makes the test stop after first failure -- `-timeout 60m` extends the timeout to longer than the default 10m -- `-count 1` is to avoid Go test caching for example when testing a rebuilt snap - -#### Run one testing suite -```bash -go test -v -failfast -count 1 ./test/suites/chip-tool -``` - -#### Run all suites -```bash -go test -p 1 -timeout 60m -failfast -count 1 ./test/suites/... -``` +Utility package for testing Matter snaps in Go. -#### Run one suite with env variables -The environment variables are defined in [test/utils/env.go](./test/utils/env.go) - -#### Test the testing utils -```bash -go test ./test/utils -count=10 +Test the testing utils: ``` - -## Test using Github Actions -This project includes two Github Actions that can be used in workflows to test snaps: -* [build](./build): Checkout code, build the snap, and upload snap as build artifact -* [test](./test): Download the snap from build artifacts (optional) and run smoke tests - -A workflow that uses both the actions from `v2` branch may look as follows: - -`.github/workflows/snap.yml` -```yaml -name: Snap Testing - -on: - pull_request: - branches: [ main ] - # allow manual trigger - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Build and upload snap - id: build - uses: canonical/matter-snap-testing/build@v2 - outputs: - snap: ${{steps.build.outputs.snap}} - - test: - needs: build - runs-on: ubuntu-latest - steps: - - name: Download and test snap - uses: canonical/matter-snap-testing/test@v2 - with: - name: device-mqtt - snap: ${{needs.build.outputs.snap}} +go test ./utils -count=100 ``` - diff --git a/build/action.yml b/build/action.yml deleted file mode 100644 index 1113e7f..0000000 --- a/build/action.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Matter Snap Builder -description: | - This action clones the source code, builds the snap using and - uploads the resulting snap as a build artifact - -inputs: - repo: - description: Source code repo with snap - required: false - default: ${{github.repository}} - branch: - description: Source code repo branch - required: false - default: ${{github.ref}} - -outputs: - snap: - description: Relative path to built snap - value: ${{steps.build.outputs.snap}} - -runs: - using: composite - - steps: - # Clone the source project - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - repository: ${{inputs.repo}} - ref: ${{inputs.branch}} - - # Build the snap - - uses: snapcore/action-build@v1 - id: build - - # Upload the snap as build artifact - - uses: actions/upload-artifact@v3 - with: - name: ${{steps.build.outputs.snap}} - path: ${{steps.build.outputs.snap}} - if-no-files-found: error - retention-days: 30 diff --git a/go.mod b/go.mod index 57c3333..e2e282b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ -module matter-snap-testing +module github.com/canonical/matter-snap-testing -go 1.17 +go 1.21.6 require github.com/stretchr/testify v1.8.3 diff --git a/go.sum b/go.sum index 82af653..6b33800 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= @@ -8,16 +7,10 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/test/action.yml b/test/action.yml deleted file mode 100644 index f26f8fc..0000000 --- a/test/action.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: Matter Snap Tester -description: | - This Github action runs various smoke tests to validate the snap packaging. - - When 'snap' input is set, the snap is downloaded from build artifacts and - its absolute path is passed to the tests. - In this case, the value of channel is not used. - -inputs: - name: - description: Name of the testing suite - required: true - snap: - description: Relative path to local snap - required: false - channel: - description: | - Channel for downloading the snap from store. - This is useful only when 'snap' input is not set. - required: false - go-args: - description: | - Flags for running go test - required: false - skip_teardown_removal: - description: | - Option for enabling removal of snaps during teardown. - This is particularly useful when running tests on ephemeral CI instances. - required: false - default: 'true' - - # The values of github.action_repository and github.action_ref vary - # based on their usage location. Therefore, setting the values as inputs - # ensures that they align with the action itself rather than the step's action - action_repository: - default: ${{ github.action_repository }} - action_ref: - default: ${{ github.action_ref }} - -runs: - using: composite - - steps: - # Download the snap from build artifacts - - if: ${{inputs.snap != ''}} - uses: actions/download-artifact@v3 - with: - name: ${{inputs.snap}} - - # Set the absolute path - - if: ${{inputs.snap != ''}} - shell: bash - id: path - run: | - echo "local_snap=${{github.workspace}}/${{inputs.snap}}" >> $GITHUB_OUTPUT - - # Checkout Repository with LFS - - uses: actions/checkout@v4 - with: - repository: ${{inputs.action_repository}} - ref: ${{inputs.action_ref}} - path: src - lfs: true - - # Run smoke tests - - shell: bash - working-directory: ${{github.workspace}}/src/test - env: - SERVICE_CHANNEL: ${{inputs.channel}} - FULL_CONFIG_TEST: ${{inputs.full_config_test}} - SKIP_TEARDOWN_REMOVAL: ${{inputs.skip_teardown_removal}} - run: | - go test -failfast -p 1 -timeout 30m -v ./suites/${{inputs.name}} ${{inputs.go-args}} - - # Print error logs from snap(s) - - if: failure() - shell: bash - working-directory: ${{github.workspace}}/src/test - run: ./print-errors.sh ${{inputs.name}} - - # Upload snap logs - - if: always() - uses: actions/upload-artifact@v3 - with: - name: ${{inputs.name}}-logs - path: ${{github.workspace}}/src/test/suites/${{inputs.name}}/*.log - retention-days: 30 diff --git a/test/print-errors.sh b/test/print-errors.sh deleted file mode 100755 index f70d443..0000000 --- a/test/print-errors.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -e - -suite=$1 - -pattern="$(dirname "$0")/suites/$suite/*.log" -for file in $pattern; do - echo -e "\nšŸŸ„ Filtered errors from $file:" - cat $file | grep --ignore-case --extended-regexp --word-regexp "error|ERR" -done - -echo -e "\nšŸ”Ž For full logs, refer to workflow artifacts." diff --git a/test/suites/chip-tool/.gitattributes b/test/suites/chip-tool/.gitattributes deleted file mode 100644 index 03de60f..0000000 --- a/test/suites/chip-tool/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -chip-all-clusters-minimal-app-commit-* filter=lfs diff=lfs merge=lfs -text diff --git a/test/suites/chip-tool/chip-all-clusters-minimal-app-commit-1536ca2 b/test/suites/chip-tool/chip-all-clusters-minimal-app-commit-1536ca2 deleted file mode 100755 index 2e456dc..0000000 --- a/test/suites/chip-tool/chip-all-clusters-minimal-app-commit-1536ca2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:29a03592355d375f14e8d5102d8b17c82c6c80ff0a8698adc79833d0360618e1 -size 98795128 diff --git a/test/suites/chip-tool/main_test.go b/test/suites/chip-tool/main_test.go deleted file mode 100644 index 46c8d25..0000000 --- a/test/suites/chip-tool/main_test.go +++ /dev/null @@ -1,152 +0,0 @@ -package test - -import ( - "log" - "matter-snap-testing/test/utils" - "os" - "os/exec" - "path/filepath" - "strings" - "testing" - "time" -) - -var start = time.Now() - -func TestMain(m *testing.M) { - teardown, err := setup() - if err != nil { - log.Fatalf("Failed to setup tests: %s", err) - } - - code := m.Run() - teardown() - - os.Exit(code) -} - -func TestMatterDeviceOperations(t *testing.T) { - const ( - chipAllClusterMinimalAppFile = "chip-all-clusters-minimal-app-commit-1536ca2" - chipAllClusterMinimalAppLog = "chip-all-clusters-minimal-app.log" - ) - - // Setup: remove exisiting log files - if err := os.Remove("./" + chipAllClusterMinimalAppLog); err != nil && !os.IsNotExist(err) { - t.Fatalf("Error deleting log file: %s\n", err) - } - if err := os.Remove("./chip-tool.log"); err != nil && !os.IsNotExist(err) { - t.Fatalf("Error deleting log file: %s\n", err) - } - - // Setup: run and log chip-all-clusters-minimal-app in the background - logFile, err := os.Create(chipAllClusterMinimalAppLog) - if err != nil { - t.Fatalf("Error creating log file: %s\n", err) - } - - cmd := exec.Command("./" + chipAllClusterMinimalAppFile) - cmd.Stdout = logFile - cmd.Stderr = logFile - - err = cmd.Start() - if err != nil { - t.Fatalf("Error starting application: %s\n", err) - } - - t.Cleanup(func() { - matches, err := filepath.Glob("/tmp/chip_*") - if err != nil { - t.Fatalf("Error finding tmp chip files: %s\n", err) - } - - for _, match := range matches { - if err := os.Remove(match); err != nil { - t.Fatalf("Error removing tmp chip file %s: %s\n", match, err) - } - } - - if err := cmd.Process.Kill(); err != nil { - t.Fatalf("Error killing process: %s\n", err) - } - - if logFile != nil { - logFile.Close() - } - }) - - t.Run("Commission", func(t *testing.T) { - utils.Exec(t, "sudo chip-tool pairing onnetwork 110 20202021") - }) - - t.Run("Control", func(t *testing.T) { - utils.Exec(t, "sudo chip-tool onoff toggle 110 1") - waitForAppMessage(t, "./"+chipAllClusterMinimalAppLog, "CHIP:ZCL: Toggle ep1 on/off", start) - }) -} - -func setup() (teardown func(), err error) { - const chipToolSnap = "chip-tool" - - log.Println("[CLEAN]") - utils.SnapRemove(nil, chipToolSnap) - - log.Println("[SETUP]") - - teardown = func() { - log.Println("[TEARDOWN]") - utils.SnapDumpLogs(nil, start, chipToolSnap) - - log.Println("Removing installed snap:", !utils.SkipTeardownRemoval) - if !utils.SkipTeardownRemoval { - utils.SnapRemove(nil, chipToolSnap) - } - } - - if utils.LocalServiceSnap() { - err = utils.SnapInstallFromFile(nil, utils.LocalServiceSnapPath) - } else { - err = utils.SnapInstallFromStore(nil, chipToolSnap, utils.ServiceChannel) - } - if err != nil { - teardown() - return - } - - // connect interfaces - utils.SnapConnect(nil, chipToolSnap+":avahi-observe", "") - utils.SnapConnect(nil, chipToolSnap+":bluez", "") - utils.SnapConnect(nil, chipToolSnap+":process-control", "") - - return -} - -func waitForAppMessage(t *testing.T, appLogPath, expectedLog string, since time.Time) { - const maxRetry = 10 - - for i := 1; i <= maxRetry; i++ { - time.Sleep(1 * time.Second) - t.Logf("Retry %d/%d: Waiting for expected content in logs: %s", i, maxRetry, expectedLog) - - logs, err := readLogFile(appLogPath) - if err != nil { - t.Fatalf("Error reading log file: %s\n", err) - continue - } - - if strings.Contains(logs, expectedLog) { - t.Logf("Found expected content in logs: %s", expectedLog) - return - } - } - - t.Fatalf("Time out: reached max %d retries.", maxRetry) -} - -func readLogFile(filePath string) (string, error) { - text, err := os.ReadFile(filePath) - if err != nil { - return "", err - } - return string(text), nil -} diff --git a/test/utils/config.go b/utils/config.go similarity index 100% rename from test/utils/config.go rename to utils/config.go diff --git a/test/utils/env.go b/utils/env.go similarity index 100% rename from test/utils/env.go rename to utils/env.go diff --git a/test/utils/exec.go b/utils/exec.go similarity index 100% rename from test/utils/exec.go rename to utils/exec.go diff --git a/test/utils/exec_test.go b/utils/exec_test.go similarity index 100% rename from test/utils/exec_test.go rename to utils/exec_test.go diff --git a/test/utils/net.go b/utils/net.go similarity index 100% rename from test/utils/net.go rename to utils/net.go diff --git a/test/utils/packaging.go b/utils/packaging.go similarity index 100% rename from test/utils/packaging.go rename to utils/packaging.go diff --git a/test/utils/refresh.go b/utils/refresh.go similarity index 100% rename from test/utils/refresh.go rename to utils/refresh.go diff --git a/test/utils/setup.go b/utils/setup.go similarity index 100% rename from test/utils/setup.go rename to utils/setup.go diff --git a/test/utils/snap.go b/utils/snap.go similarity index 100% rename from test/utils/snap.go rename to utils/snap.go