Skip to content

Commit

Permalink
Leaf 4682 - adding comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jampaul3 committed Mar 4, 2025
1 parent 3a7ddce commit daa45eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions API-tests/group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func postNewGroup() string {
return c
}

// postNewTag creates a new tag for the given groupID
func postNewTag(groupID string, tag string) string {
postData := url.Values{}
if tag != "" {
Expand Down Expand Up @@ -100,6 +101,8 @@ func importGroup(groupID string) string {
return c
}

// changed this method so that it could be used more universally, with the url being passed in
// more variables could be needed to go with the url
func removeFromNexus(postUrl string, tag string) error {

data := url.Values{}
Expand Down Expand Up @@ -226,6 +229,7 @@ func TestGroup_syncServices(t *testing.T) {
}
}

// A test to remove a tag from the nexus group
func TestGroup_removeTag(t *testing.T) {
// add a tag to a group
id := "34"
Expand Down
4 changes: 4 additions & 0 deletions API-tests/platform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/google/go-cmp/cmp"
)

// get all the portal import tags for the given orgchart
func getOrgchartImportTags(url string) PlatformResponse {
res, _ := client.Get(url)
b, _ := io.ReadAll(res.Body)
Expand All @@ -23,6 +24,9 @@ func getOrgchartImportTags(url string) PlatformResponse {
return m
}

// this test gets all the portals for the given orgchart and makes sure that
// the correct correct number of portals are returned, and that the correct
// tag is returned for the first portal
func TestPlatform_getOrgchartTags(t *testing.T) {
portals := getOrgchartImportTags(RootOrgchartURL + `api/platform/portal/_LEAF_Nexus`)

Expand Down

0 comments on commit daa45eb

Please sign in to comment.