Skip to content

Commit

Permalink
Add func to create secret with role (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
SupriyaKasten committed Nov 7, 2019
1 parent bc128b1 commit 77091d2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,20 @@ func NewTestProfileSecret() *v1.Secret {
}
}

// NewTestProfileSecretWithRole function returns a pointer to a new Secret test object with role.
func NewTestProfileSecretWithRole(role string) *v1.Secret {
return &v1.Secret{
ObjectMeta: metav1.ObjectMeta{
GenerateName: "test-secret-",
},
Data: map[string][]byte{
"id": []byte("foo"),
"secret": []byte("bar"),
"role": []byte(role),
},
}
}

// NewTestProfile function returns a pointer to a new Profile test object that
// passes validation.
func NewTestProfile(namespace string, secretName string) *crv1alpha1.Profile {
Expand Down

0 comments on commit 77091d2

Please sign in to comment.