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

Update dependencies #73

Merged
merged 4 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 4 additions & 3 deletions tests/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"testing"
"time"

"github.com/canonical/matter-snap-testing/env"
"github.com/canonical/matter-snap-testing/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand All @@ -19,13 +20,13 @@ func InstallChipTool(t *testing.T) {
// clean
utils.SnapRemove(t, chipToolSnap)

if utils.LocalServiceSnap() {
if env.SnapPath() != "" {
require.NoError(t,
utils.SnapInstallFromFile(nil, utils.LocalServiceSnapPath),
utils.SnapInstallFromFile(nil, env.SnapPath()),
)
} else {
require.NoError(t,
utils.SnapInstallFromStore(nil, chipToolSnap, utils.ServiceChannel),
utils.SnapInstallFromStore(nil, chipToolSnap, env.SnapChannel()),
)
}
t.Cleanup(func() {
Expand Down
12 changes: 7 additions & 5 deletions tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
module chip-tool-snap-tests

go 1.21.6
go 1.22.1

toolchain go1.22.5

require (
github.com/canonical/matter-snap-testing v1.0.0-beta.1
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.20.0
github.com/canonical/matter-snap-testing v1.0.0-beta.4
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.25.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/sys v0.22.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
20 changes: 10 additions & 10 deletions tests/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/canonical/matter-snap-testing v1.0.0-beta.1 h1:obxh5jYRWgCw6QNax4+aY571h+q/zcPZBOP64gwd56E=
github.com/canonical/matter-snap-testing v1.0.0-beta.1/go.mod h1:800wP9+ux8DW9Xr9QvlIdxFHlu85mqlhvlA2JO20aeQ=
github.com/canonical/matter-snap-testing v1.0.0-beta.4 h1:fbmKYeGaIFAlugDBx6ehz0U10bG+WcFSgNBo36hxBL0=
github.com/canonical/matter-snap-testing v1.0.0-beta.4/go.mod h1:gQqLfxxUD2Uo1Ua/L1uIuRhTVghAtdS54yhetTOeSIc=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
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=
Expand All @@ -9,14 +9,14 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
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/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg=
golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
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=
Expand Down
3 changes: 2 additions & 1 deletion tests/thread_tests/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package thread_tests

import (
"fmt"
"github.com/canonical/matter-snap-testing/env"
jpm-canonical marked this conversation as resolved.
Show resolved Hide resolved
"os"
"strings"
"testing"
Expand All @@ -19,7 +20,7 @@ func setup(t *testing.T) {
utils.SnapRemove(t, otbrSnap)

// Install OTBR
utils.SnapInstallFromStore(t, otbrSnap, utils.ServiceChannel)
utils.SnapInstallFromStore(t, otbrSnap, env.SnapChannel())
t.Cleanup(func() {
utils.SnapRemove(t, otbrSnap)
})
Expand Down
7 changes: 4 additions & 3 deletions tests/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"
"time"

"github.com/canonical/matter-snap-testing/env"
"github.com/canonical/matter-snap-testing/utils"
)

Expand All @@ -31,7 +32,7 @@ func TestUpgrade(t *testing.T) {
utils.SnapConnect(t, chipToolSnap+":process-control", "")

// Install all clusters app
utils.SnapInstallFromStore(t, allClustersSnap, utils.ServiceChannel)
utils.SnapInstallFromStore(t, allClustersSnap, env.SnapChannel())

// Setup all clusters app
utils.SnapSet(t, allClustersSnap, "args", "--wifi")
Expand Down Expand Up @@ -61,8 +62,8 @@ func TestUpgrade(t *testing.T) {
})

t.Run("Upgrade snap", func(t *testing.T) {
if utils.LocalServiceSnap() {
utils.SnapInstallFromFile(t, utils.LocalServiceSnapPath)
if env.SnapPath() != "" {
utils.SnapInstallFromFile(t, env.SnapPath())
} else {
utils.SnapRefresh(t, chipToolSnap, "latest/edge")
}
Expand Down
Loading