summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/rb/profile_test.go
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2019-04-02 17:20:12 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-02 17:20:12 +0000
commit408200f3c402fa31fc465b5cd8b2ea4340048468 (patch)
tree8de5c58ed150e3f2339ad29b78c47dc847f624fe /src/k8splugin/internal/rb/profile_test.go
parenta1e2fb3ff225509885f82311096d0353e1117877 (diff)
parentf3875e13c7a6675aa980c29580daae42a32eb97f (diff)
Merge "Make profile key explicit"
Diffstat (limited to 'src/k8splugin/internal/rb/profile_test.go')
-rw-r--r--src/k8splugin/internal/rb/profile_test.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/k8splugin/internal/rb/profile_test.go b/src/k8splugin/internal/rb/profile_test.go
index e0f43824..14d37d17 100644
--- a/src/k8splugin/internal/rb/profile_test.go
+++ b/src/k8splugin/internal/rb/profile_test.go
@@ -37,7 +37,7 @@ func TestCreateProfile(t *testing.T) {
{
label: "Create Resource Bundle Profile",
inp: Profile{
- Name: "testprofile1",
+ ProfileName: "testprofile1",
ReleaseName: "testprofilereleasename",
Namespace: "testnamespace",
KubernetesVersion: "1.12.3",
@@ -45,7 +45,7 @@ func TestCreateProfile(t *testing.T) {
RBVersion: "v1",
},
expected: Profile{
- Name: "testprofile1",
+ ProfileName: "testprofile1",
ReleaseName: "testprofilereleasename",
Namespace: "testnamespace",
KubernetesVersion: "1.12.3",
@@ -68,7 +68,7 @@ func TestCreateProfile(t *testing.T) {
{
label: "Create Resource Bundle Profile With Non-Existing Definition",
inp: Profile{
- Name: "testprofile1",
+ ProfileName: "testprofile1",
ReleaseName: "testprofilereleasename",
Namespace: "testnamespace",
KubernetesVersion: "1.12.3",
@@ -134,7 +134,7 @@ func TestGetProfile(t *testing.T) {
rbversion: "v1",
prname: "testprofile1",
expected: Profile{
- Name: "testprofile1",
+ ProfileName: "testprofile1",
ReleaseName: "testprofilereleasename",
Namespace: "testnamespace",
KubernetesVersion: "1.12.3",
@@ -144,7 +144,7 @@ func TestGetProfile(t *testing.T) {
expectedError: "",
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
- ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", Name: "testprofile1"}.String(): {
+ ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile1"}.String(): {
"metadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
@@ -264,7 +264,7 @@ func TestUploadProfile(t *testing.T) {
},
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
- ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", Name: "testprofile1"}.String(): {
+ ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile1"}.String(): {
"metadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
@@ -305,7 +305,7 @@ func TestUploadProfile(t *testing.T) {
},
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
- ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", Name: "testprofile2"}.String(): {
+ ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile2"}.String(): {
"metadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
@@ -329,7 +329,7 @@ func TestUploadProfile(t *testing.T) {
},
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
- ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", Name: "testprofile1"}.String(): {
+ ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile1"}.String(): {
"metadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
@@ -424,7 +424,7 @@ func TestDownloadProfile(t *testing.T) {
},
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
- ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", Name: "testprofile1"}.String(): {
+ ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile1"}.String(): {
"metadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
@@ -448,7 +448,7 @@ func TestDownloadProfile(t *testing.T) {
expectedError: "Invalid Profile Name provided",
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
- ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", Name: "testprofile2"}.String(): {
+ ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile2"}.String(): {
"metadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
@@ -511,7 +511,7 @@ func TestResolveProfile(t *testing.T) {
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
ProfileKey{RBName: "testresourcebundle", RBVersion: "v1",
- Name: "profile1"}.String(): {
+ ProfileName: "profile1"}.String(): {
"metadata": []byte(
"{\"profile-name\":\"profile1\"," +
"\"release-name\":\"testprofilereleasename\"," +