File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ func postNewGroup() string {
70
70
return c
71
71
}
72
72
73
+ // postNewTag creates a new tag for the given groupID
73
74
func postNewTag (groupID string , tag string ) string {
74
75
postData := url.Values {}
75
76
if tag != "" {
@@ -100,6 +101,8 @@ func importGroup(groupID string) string {
100
101
return c
101
102
}
102
103
104
+ // changed this method so that it could be used more universally, with the url being passed in
105
+ // more variables could be needed to go with the url
103
106
func removeFromNexus (postUrl string , tag string ) error {
104
107
105
108
data := url.Values {}
@@ -226,6 +229,7 @@ func TestGroup_syncServices(t *testing.T) {
226
229
}
227
230
}
228
231
232
+ // A test to remove a tag from the nexus group
229
233
func TestGroup_removeTag (t * testing.T ) {
230
234
// add a tag to a group
231
235
id := "34"
Original file line number Diff line number Diff line change 9
9
"github.com/google/go-cmp/cmp"
10
10
)
11
11
12
+ // get all the portal import tags for the given orgchart
12
13
func getOrgchartImportTags (url string ) PlatformResponse {
13
14
res , _ := client .Get (url )
14
15
b , _ := io .ReadAll (res .Body )
@@ -23,6 +24,9 @@ func getOrgchartImportTags(url string) PlatformResponse {
23
24
return m
24
25
}
25
26
27
+ // this test gets all the portals for the given orgchart and makes sure that
28
+ // the correct correct number of portals are returned, and that the correct
29
+ // tag is returned for the first portal
26
30
func TestPlatform_getOrgchartTags (t * testing.T ) {
27
31
portals := getOrgchartImportTags (RootOrgchartURL + `api/platform/portal/_LEAF_Nexus` )
28
32
You can’t perform that action at this time.
0 commit comments