Skip to content

Commit

Permalink
adding rename domains test
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsherrill committed Nov 4, 2024
1 parent 151c278 commit fe09e98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/jobs/rename_domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func RenameDomains() {
if res.Error != nil {
log.Error().Err(res.Error).Msg("failed to lookup RedHat domain")
} else {
err := renameDomain(ctx, db.DB, daoReg, config.RedHatOrg, config.RedHatDomainName)
err := RenameDomain(ctx, db.DB, daoReg, config.RedHatOrg, config.RedHatDomainName)
if err != nil {
renameErrors[config.RedHatOrg] = err
}
Expand All @@ -46,7 +46,7 @@ func RenameDomains() {
if !strings.HasPrefix(newName, "cs-") {
newName = fmt.Sprintf("cs-%s", newName)
}
err := renameDomain(ctx, db.DB, daoReg, domain.OrgId, newName)
err := RenameDomain(ctx, db.DB, daoReg, domain.OrgId, newName)
if err != nil {
renameErrors[config.RedHatOrg] = err
}
Expand All @@ -58,7 +58,7 @@ func RenameDomains() {
}
}

func renameDomain(ctx context.Context, DB *gorm.DB, daoReg *dao.DaoRegistry, orgId string, newName string) error {
func RenameDomain(ctx context.Context, DB *gorm.DB, daoReg *dao.DaoRegistry, orgId string, newName string) error {
pulpClient := pulp_client.GetGlobalPulpClient()
cpClient := candlepin_client.NewCandlepinClient()

Expand Down

0 comments on commit fe09e98

Please sign in to comment.