Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed Mar 15, 2024
1 parent 393e55e commit 79fdd50
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions secret/vault/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ func TestVault_Get_Org(t *testing.T) {
want.SetType("org")
want.SetImages([]string{"foo", "bar"})
want.SetEvents([]string{"foo", "bar"})
want.SetAllowCommand(true)
want.SetAllowSubstitution(true)
want.SetAllowEvents(library.NewEventsFromMask(1))
want.SetCreatedAt(1563474077)
want.SetCreatedBy("octocat")
want.SetUpdatedAt(1563474079)
want.SetUpdatedBy("octocat2")

type args struct {
version string
Expand Down Expand Up @@ -136,6 +143,13 @@ func TestVault_Get_Repo(t *testing.T) {
want.SetType("repo")
want.SetImages([]string{"foo", "bar"})
want.SetEvents([]string{"foo", "bar"})
want.SetAllowCommand(true)
want.SetAllowSubstitution(true)
want.SetAllowEvents(library.NewEventsFromMask(3))
want.SetCreatedAt(1563474077)
want.SetCreatedBy("octocat")
want.SetUpdatedAt(1563474079)
want.SetUpdatedBy("octocat2")

type args struct {
version string
Expand Down Expand Up @@ -220,6 +234,13 @@ func TestVault_Get_Shared(t *testing.T) {
want.SetType("shared")
want.SetImages([]string{"foo", "bar"})
want.SetEvents([]string{"foo", "bar"})
want.SetAllowCommand(false)
want.SetAllowSubstitution(false)
want.SetAllowEvents(library.NewEventsFromMask(1))
want.SetCreatedAt(1563474077)
want.SetCreatedBy("octocat")
want.SetUpdatedAt(1563474079)
want.SetUpdatedBy("octocat2")

type args struct {
version string
Expand Down
21 changes: 21 additions & 0 deletions secret/vault/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ func TestVault_List_Org(t *testing.T) {
sec.SetType("org")
sec.SetImages([]string{"foo", "bar"})
sec.SetEvents([]string{"foo", "bar"})
sec.SetAllowCommand(true)
sec.SetAllowSubstitution(true)
sec.SetAllowEvents(library.NewEventsFromMask(1))
sec.SetCreatedAt(1563474077)
sec.SetCreatedBy("octocat")
sec.SetUpdatedAt(1563474079)
sec.SetUpdatedBy("octocat2")

want := []*library.Secret{sec}

Expand Down Expand Up @@ -198,6 +205,13 @@ func TestVault_List_Repo(t *testing.T) {
sec.SetType("repo")
sec.SetImages([]string{"foo", "bar"})
sec.SetEvents([]string{"foo", "bar"})
sec.SetAllowCommand(true)
sec.SetAllowSubstitution(true)
sec.SetAllowEvents(library.NewEventsFromMask(3))
sec.SetCreatedAt(1563474077)
sec.SetCreatedBy("octocat")
sec.SetUpdatedAt(1563474079)
sec.SetUpdatedBy("octocat2")

want := []*library.Secret{sec}

Expand Down Expand Up @@ -314,6 +328,13 @@ func TestVault_List_Shared(t *testing.T) {
sec.SetType("shared")
sec.SetImages([]string{"foo", "bar"})
sec.SetEvents([]string{"foo", "bar"})
sec.SetAllowCommand(false)
sec.SetAllowSubstitution(false)
sec.SetAllowEvents(library.NewEventsFromMask(1))
sec.SetCreatedAt(1563474077)
sec.SetCreatedBy("octocat")
sec.SetUpdatedAt(1563474079)
sec.SetUpdatedBy("octocat2")

want := []*library.Secret{sec}

Expand Down

0 comments on commit 79fdd50

Please sign in to comment.