Skip to content

Commit

Permalink
fix: remove username
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin committed Oct 22, 2024
1 parent fc61c7f commit 9cde4b6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
3 changes: 0 additions & 3 deletions api/v1/testkube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7196,9 +7196,6 @@ components:
name:
type: string
description: actor name
username:
type: string
description: actor username
email:
type: string
description: actor email
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ require (
github.com/gookit/color v1.5.4
github.com/gorilla/websocket v1.5.0
github.com/h2non/filetype v1.1.3
github.com/hashicorp/golang-lru/v2 v2.0.1
github.com/itchyny/gojq v0.12.14
github.com/joshdk/go-junit v1.0.0
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/kelseyhightower/envconfig v1.4.0
github.com/kubepug/kubepug v1.7.1
github.com/kubeshop/testkube-operator v1.17.55-0.20241022090637-302d75229fb0
github.com/kubeshop/testkube-operator v1.17.55-0.20241022123644-9de69044548e
github.com/minio/minio-go/v7 v7.0.47
github.com/montanaflynn/stats v0.6.6
github.com/moogar0880/problems v0.1.1
Expand Down Expand Up @@ -73,6 +74,7 @@ require (
k8s.io/api v0.28.4
k8s.io/apimachinery v0.28.4
k8s.io/client-go v0.28.4
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/kustomize/kyaml v0.15.0
)
Expand Down Expand Up @@ -133,7 +135,6 @@ require (
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.1 // indirect
github.com/henvic/httpretty v0.0.6 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand Down Expand Up @@ -226,7 +227,6 @@ require (
k8s.io/component-base v0.28.3 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230918164632-68afd615200d // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kubepug/kubepug v1.7.1 h1:LKhfSxS8Y5mXs50v+3Lpyec+cogErDLcV7CMUuiaisw=
github.com/kubepug/kubepug v1.7.1/go.mod h1:lv+HxD0oTFL7ZWjj0u6HKhMbbTIId3eG7aWIW0gyF8g=
github.com/kubeshop/testkube-operator v1.17.55-0.20241022090637-302d75229fb0 h1:olT9HGd0/xtCe/y1sq+jV9hjmtLWm6G86+Vh031fOyw=
github.com/kubeshop/testkube-operator v1.17.55-0.20241022090637-302d75229fb0/go.mod h1:P47tw1nKQFufdsZndyq2HG2MSa0zK/lU0XpRfZtEmIk=
github.com/kubeshop/testkube-operator v1.17.55-0.20241022123644-9de69044548e h1:UKrSOLIkdm5cslfQ3k5ByaEZim9j3vuabnbwDL6Nf8Y=
github.com/kubeshop/testkube-operator v1.17.55-0.20241022123644-9de69044548e/go.mod h1:P47tw1nKQFufdsZndyq2HG2MSa0zK/lU0XpRfZtEmIk=
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8LFgLN4=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ package testkube
type TestWorkflowRunningContextActor struct {
// actor name
Name string `json:"name,omitempty"`
// actor username
Username string `json:"username,omitempty"`
// actor email
Email string `json:"email,omitempty"`
// test workflow execution id
Expand Down
10 changes: 5 additions & 5 deletions pkg/tcl/testworkflowstcl/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
)

func GetRunningContext(runContext, token string, interfaceType testkube.TestWorkflowRunningContextInterfaceType) *testkube.TestWorkflowRunningContext {
var username, email string
var name, email string
if token != "" {
payload, err := getJWTPayload(token)
if err == nil {
if value, ok := payload["userame"]; ok {
username = fmt.Sprint(value)
name = fmt.Sprint(value)
}

if value, ok := payload["email"]; ok {
Expand All @@ -39,9 +39,9 @@ func GetRunningContext(runContext, token string, interfaceType testkube.TestWork
Type_: common.Ptr(interfaceType),
},
Actor: &testkube.TestWorkflowRunningContextActor{
Type_: common.Ptr(testkube.USER_TestWorkflowRunningContextActorType),
Username: username,
Email: email,
Type_: common.Ptr(testkube.USER_TestWorkflowRunningContextActorType),
Name: name,
Email: email,
},
}
}
Expand Down

0 comments on commit 9cde4b6

Please sign in to comment.