Skip to content

Commit 9adae96

Browse files
authored
Merge pull request #34 from yahoo/fit-unit
fix: add missing ctx to unit test
2 parents 1921159 + eec1c10 commit 9adae96

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ require (
1515
github.com/stretchr/testify v1.5.1
1616
github.com/tevino/abool v0.0.0-20170917061928-9b9efcf221b5
1717
github.com/yahoo/athenz v1.9.30
18+
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
1819
gopkg.in/natefinch/lumberjack.v2 v2.0.0
1920
k8s.io/api v0.19.15
2021
k8s.io/apimachinery v0.19.15

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w
265265
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
266266
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY=
267267
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
268+
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
269+
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
268270
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
269271
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
270272
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=

test/e2e/basic_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
//go:build e2e
12
// +build e2e
23

34
package e2e
45

56
import (
7+
"context"
68
"testing"
79
"time"
810

@@ -166,11 +168,11 @@ func TestNamespace(t *testing.T) {
166168
}
167169
// adding namespace to cluster
168170
namespace := f.MyUtil.DomainToNamespace(f.NamespaceDomain)
169-
_, err = f.K8sClient.CoreV1().Namespaces().Create(&v1.Namespace{
171+
_, err = f.K8sClient.CoreV1().Namespaces().Create(context.TODO(), &v1.Namespace{
170172
ObjectMeta: metav1.ObjectMeta{
171173
Name: namespace,
172174
},
173-
})
175+
}, metav1.CreateOptions{})
174176
if err != nil {
175177
log.Errorf("test 3 unable to create namespace: %v", err)
176178
t.Error("Unable to create new namespace")

0 commit comments

Comments
 (0)